日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) >

matlab中的scramble函数,matlab 中 hold on 和hold off的使用

發(fā)布時(shí)間:2024/4/18 84 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab中的scramble函数,matlab 中 hold on 和hold off的使用 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

hold on 使當(dāng)前軸及圖形保持而不被刷新,準(zhǔn)備接受此后將繪制的圖形,多圖共存

hold off 使當(dāng)前軸及圖形不在具備被刷新的性質(zhì),新圖出現(xiàn)時(shí),取消原圖

hold on 在當(dāng)前圖的軸(坐標(biāo)系)中畫了一幅圖,再畫另一幅圖時(shí),原來(lái)的圖還在,與新圖共存,都看得到

close all

x=0:2:100;

y1=2*x;

y2=3*x;

y3=3.5*x;

ph1=plot(x,y1,'r-'); hold on

ph2=plot(x,y2,'g--');

ph3=plot(x,y3,'b:');

title('fake data')

xlabel('my x data');

ylabel('my y data');

th1=text(x(13),y1(13),'red line');

th2=text(x(15),y2(15),'green line');

th3=text(x(17),y3(17),'blue line');

set(th1,'Color','r');

set(th2,'Color','g');

set(th3,'Color','b')

lh=legend([ph1 ph2 ph3],{'x2';'x3';'x3.5'})

hold off 在當(dāng)前圖的軸(坐標(biāo)系)中畫了一幅圖,此時(shí),狀態(tài)是hold off,則再畫另一幅圖時(shí),原來(lái)的圖就看不到了,在軸上繪制的是新圖,原圖被替換了

close all

x=0:2:100;

y1=2*x;

y2=3*x;

y3=3.5*x;

ph1=plot(x,y1,'r-'); hold off

ph2=plot(x,y2,'g--');

ph3=plot(x,y3,'b:');

title('fake data')

xlabel('my x data');

ylabel('my y data');

th1=text(x(13),y1(13),'red line');

th2=text(x(15),y2(15),'green line');

th3=text(x(17),y3(17),'blue line');

set(th1,'Color','r');

set(th2,'Color','g');

set(th3,'Color','b')

lh=legend([ph1 ph2 ph3],{'x2';'x3';'x3.5'})

總結(jié)

以上是生活随笔為你收集整理的matlab中的scramble函数,matlab 中 hold on 和hold off的使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。