相关代码 |
|
[rp1,time1]=textread('ok1.txt','%f%f'); rp1=rp1-200; rp=zeros(100,1); time_1=zeros(100,1); for i=1:100; rp(i)=rp1(i); time_1(i)=time1(i); end time_1=time_1'; [rp2,time2]=textread('ok2.txt','%f%f'); time_2=zeros(100,1); for i=1:100; time_2(i)=time2(i); end time_2=time_2'; time=[time_1;time_2]; h=stem(rp,time'); set(h(1),'MarkerFaceColor','blue') set(h(2),'MarkerFaceColor','red','Marker','square')