天天看點

matlab畫出一維數組的數值折線圖,并标記特定點

i=81;

sp=shuiping(i,:);

sp(sp<=5&sp>=-5)=0;

ss_t=tempshuiping2(i,:);

x=(1:1:256);

str=[repmat('',256,1) num2str(x')];

%plot(x,te_1,'-*')

 plot(sp,'-*');

 text(x,sp,cellstr(str));

 for d=1:1:256

     if ss_t(d)>=1

    % text(g,sp,cellstr(str));

    text(x(d),sp(d),'o','color','r');

     end

 end

繼續閱讀