作者danny3652003 (发哥)
看板MATLAB
标题[问题] 绘图 hold on 取部分图
时间Sat Mar 22 16:23:26 2014
如果我有程式码如下
tx0=10:0.1:12;
tx1=11:0.1:13;
ty=sin(tx0);
plot(tx0,ty,'b')
hold on
plot(tx1,ty,'b')
此为两条线
想将它变成一条如
figure(2)
plot(tx0(1:16),ty0(1:16),'b')
hold on
plot(tx1(6:21),ty0(6:21),'b')
这样的图
要怎麽去掉交线以上
只能数格子吗...
或是有其他写法?
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.123.122.12