實驗2大數(shù)據(jù)可視化處理實驗_第1頁
實驗2大數(shù)據(jù)可視化處理實驗_第2頁
實驗2大數(shù)據(jù)可視化處理實驗_第3頁
免費預(yù)覽已結(jié)束,剩余16頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、科學(xué)計算與數(shù)據(jù)處理實驗報告學(xué)號實驗名數(shù)據(jù)可視化處理實驗實 驗 目 的1、掌握 MATLAB2、掌握 MATLAB3、熟悉 MATLAB4、了解 MATLAB中二維曲線圖、三維曲線圖、三維曲面圖的繪制方法 中常用統(tǒng)計圖的繪制方法中三維圖形常用編輯方法 中動畫的繪制方法實 驗 方 案1、離散數(shù)據(jù)可視化實驗:繪制離散函數(shù)1(n 3)211(n 9)24的圖形,其中自變量的取值范圍是(0,16)的整數(shù)。2、二維曲線繪制實驗:設(shè)計實驗演示驗證 ylabel、 zlabel、 title、 text、 grid、 box、 線中的功能和使用方法。plot、subplot、axis、set、lege nd、

2、xlabel、 hold、plotyy、fplot等函數(shù)在繪制二維曲3、三維曲線繪制實驗:設(shè)計實驗演示驗證 plot3、mesh、surf等函數(shù)在繪制三維曲線、曲面中的功能和使用方法。4、統(tǒng)計圖繪制實驗:設(shè)計實驗演示驗證面域圖(area)、直方圖(bar、barh、bar3、bar3h)、餅圖(pie、pie3)、散點圖(scatter、scatter3、plotmatrix )等統(tǒng)計圖的 繪制方法。5、三維圖形編輯(精細(xì)控制)實驗:設(shè)計實驗演示驗證用view、rotate、colordef >colormap、shad in g、light > lighti ng、materia

3、l、surfl 等函數(shù)對三維圖形進(jìn)行精細(xì) 控制的方法。6、動畫繪制實驗:設(shè)計實驗演示驗證getframe與movie相結(jié)合繪制動畫的方法。(1)繪制離散函數(shù)y12(n 3)11(n 9)24的圖形記 >>n=1:0.5:16;>> y=1./( n-3)42+1)+1./( n-9)92+4)錄Columns 1 through 90.21470.32430.25000.51890.82161.02500.82920.53450.3489Colu mns 10 through 180.19950.17690.25840.17300.18380.20710.23850.2

4、6730.2770Colu mns 19 through 270.22000.17750.14040.11120.08910.07250.05990.05020.0427Columns 28 through 310.03670.03190.02800.0248>> plot( n, y,'*')1 4ipini1 2-1-0.8-C.5* *C.4C.20-* *+ * + +)Z4E®10121416(2) plot、 subplot、 axis、 set、 lege nd、 xlabel、 ylabel、 zlabel、 title、 text、 gr

5、id 、 box、 hold、plotyy、fplot 函數(shù)演示>> x=0:0.1:5;>> y=si n( x);>> z=cos(x);>> h=ta n( x);>> subplot(2,1,1);>> plot(x,y);>> subplot(2,1,2);>> plot(x,z);>> axis(O 4 0 20);>> h=plot(x,y);>> set(h,'color','b');>> set(gca

6、,'XGrid',' on ','YGrid','ofT);>> set(gca,'color','g');>> clear>> x=0:0.05:10;>> plot(x,si n(x),'*b',x,cos(x),'+r',x,ta n(x)./100,'+');>> lege nd('si n','cos','ta n');O1234567S910

7、>> clear>> x=0:0.05:15;>> plot3(x,si n(x),cos(x),'b','li newidth',1);>> xlabel('X');>> ylabel('Y');>> zlabel('Z');>> title('三維曲線')>> text(1,1,'圖像示例')>> grid('o n')>> box on三誰曲線

8、¥>> hold on>> plot3(x,x.A2,x.A(1./2)>> plot3(x,si n(x),cos(x),'b','li newidth',5);三維曲線JOO>> clear>> x = 0:0.01:20;>> y1 = 200*exp(-0.05*x).*s in (x);>> y2 = 0.8*exp(-0.5*x).*si n(10*x);>> AX,H1,H2 = plotyy(x,y1,x,y2,'plot')

9、;(3)實驗演示 plot3、mesh、surf函數(shù)Plot3函數(shù)已在上面演示。>> clear>> z=peaks(25);>> subplot(1,2,1);>> mesh(z)>> title('mesh 函數(shù)');>> subplot(1,2,2);>> surf(z)>> title('surf 函數(shù)');>> x=0:0.2:2*pi;>> y=si n( x);>> subplot(2,2,1);>> ba

10、r(y);>> title('bar');>> subplot(2,2,2);>> barh(y);>> title('barh'); >>Y=1,2,3;4,5,6;>> subplot(2,2,3);>> bar3(Y);>> title('bar3');>> subplot(2,2,4);>> bar3h(Y);>> title('bar3h');barbarhbar310.50O.£

11、110T-" ': J-bar3h110>> x=1 2 3 4 5 6 7; >> y=0 0 0 1 0 0 0;>> subplot(1,2,1);>> pie(x,y);>> subplot(1,2,2); >> pie3(4 3 6 8 9);21%>> clear>> a=ra nd(200,1);>> b=ra nd(200,1);>> c=ra nd(200,1);>> scatter(a,b,100,c,'p')

12、Frint Fii gure0.30.G0.40.30.20.1喩I0.20.30.40.50.6僉嚴(yán)0J 0.80.S1>> clear >> x=1:1O;>> y=x+ra nd(size(x);>> z=ra nd(size(x)+ra nd(size(y);>> scatter3(x,y,z,'filled');>> clear>> x=ra ndn (100,2);>> plotmatrix(x)106202D1510105103025>> clear>

13、> z=peaks(25);>> subplot(1,2,1);surf(z);title('Default');>> subplot(1,2,2);h=surf(z);title('Rotated');>> rotate(h,-2,-2,0,30,2,2,0);RotatedD efa u It>> clear>> z=peaks(25);>> subplot(1,2,1);surf(z);title('Default');>> subplot(1,2,2);>> subplot(1,2,2);h=surf(z);title('view');>> view(0,45);Defaultview-15-10-50300 on io實 驗 總 結(jié)(6)實驗演示 getframe與movie相結(jié)合繪制動畫 >> x,y,z=peaks(25);>>surf(x,y,z);>>m=movie in (10);>>for i=1:10;view(24*(i-1),30);m(:,i)=getframe;end>>movie(m,2);通過

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論