實驗2 數(shù)據(jù)可視化處理實驗_第1頁
實驗2 數(shù)據(jù)可視化處理實驗_第2頁
實驗2 數(shù)據(jù)可視化處理實驗_第3頁
實驗2 數(shù)據(jù)可視化處理實驗_第4頁
實驗2 數(shù)據(jù)可視化處理實驗_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、科學(xué)計算與數(shù)據(jù)處理實驗報告學(xué)號姓 名實驗名稱數(shù)據(jù)可視化處理實驗實驗?zāi)康?、 掌握MATLAB中二維曲線圖、三維曲線圖、三維曲面圖的繪制方法2、 掌握MATLAB中常用統(tǒng)計圖的繪制方法3、 熟悉MATLAB中三維圖形常用編輯方法4、 了解MATLAB中動畫的繪制方法實驗方案1、 離散數(shù)據(jù)可視化實驗:繪制離散函數(shù)的圖形,其中自變量的取值范圍是(0,16)的整數(shù)。2、 二維曲線繪制實驗:設(shè)計實驗演示驗證plot、subplot、axis、set、legend、xlabel、ylabel、zlabel、title、text、grid、box、hold、plotyy、fplot等函數(shù)在繪制二維曲線中的功

2、能和使用方法。3、 三維曲線繪制實驗:設(shè)計實驗演示驗證plot3、mesh、surf等函數(shù)在繪制三維曲線、曲面中的功能和使用方法。4、 統(tǒng)計圖繪制實驗:設(shè)計實驗演示驗證面域圖(area)、直方圖(bar、barh、bar3、bar3h)、餅圖(pie、pie3)、散點圖(scatter、scatter3、plotmatrix)等統(tǒng)計圖的繪制方法。5、 三維圖形編輯(精細控制)實驗:設(shè)計實驗演示驗證用view、rotate、colordef、colormap、shading、light、lighting、material、surfl等函數(shù)對三維圖形進行精細控制的方法。6、 動畫繪制實驗:設(shè)計實驗

3、演示驗證getframe與movie相結(jié)合繪制動畫的方法。實驗記錄(1)繪制離散函數(shù)的圖形>> n=1:0.5:16;>> y=1./(n-3).2+1)+1./(n-9).2+4)y = Columns 1 through 9 0.2147 0.3243 0.5189 0.8216 1.0250 0.8292 0.5345 0.3489 0.2500 Columns 10 through 18 0.1995 0.1769 0.1730 0.1838 0.2071 0.2385 0.2673 0.2770 0.2584 Columns 19 through 27 0.2

4、200 0.1775 0.1404 0.1112 0.0891 0.0725 0.0599 0.0502 0.0427 Columns 28 through 31 0.0367 0.0319 0.0280 0.0248>> plot(n,y,'*')(2)plot、subplot、axis、set、legend、xlabel、ylabel、zlabel、title、text、grid、box、hold、plotyy、fplot函數(shù)演示>> x=0:0.1:5;>> y=sin(x);>> z=cos(x);>> h=t

5、an(x);>> subplot(2,1,1);>> plot(x,y);>> subplot(2,1,2);>> plot(x,z);>> axis(0 4 0 20);>> h=plot(x,y);>> set(h,'color','b');>> set(gca,'XGrid','on','YGrid','off');>> set(gca,'color','g

6、9;);>> clear>> x=0:0.05:10;>> plot(x,sin(x),'*b',x,cos(x),'+r',x,tan(x)./100,'+');>> legend('sin','cos','tan');>> clear>> x=0:0.05:15;>> plot3(x,sin(x),cos(x),'b','linewidth',1);>> xlabel(

7、'X');>> ylabel('Y');>> zlabel('Z');>> title('三維曲線')>> text(1,1,'圖像示例')>> grid('on')>> box on>> hold on>> plot3(x,x.2,x.(1./2)>> plot3(x,sin(x),cos(x),'b','linewidth',5);>> clea

8、r>> x = 0:0.01:20;>> y1 = 200*exp(-0.05*x).*sin(x);>> y2 = 0.8*exp(-0.5*x).*sin(10*x);>> AX,H1,H2 = plotyy(x,y1,x,y2,'plot');(3)實驗演示plot3、mesh、surf函數(shù)Plot3函數(shù)已在上面演示。>> clear>> z=peaks(25);>> subplot(1,2,1);>> mesh(z)>> title('mesh函數(shù)'

9、;);>> subplot(1,2,2);>> surf(z)>> title('surf函數(shù)');(4)實驗演示面域圖(area)、直方圖(bar、barh、bar3、bar3h)、餅圖(pie、pie3)、散點圖(scatter、scatter3、plotmatrix)>> x=magic(6);>> area(x);>> clear>> x=0:0.2:2*pi;>> y=sin(x);>> subplot(2,2,1);>> bar(y);>&g

10、t; 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');>> x=1 2 3 4 5 6 7;>> y=

11、0 0 0 1 0 0 0;>> subplot(1,2,1);>> pie(x,y);>> subplot(1,2,2);>> pie3(4 3 6 8 9);>> clear>> a=rand(200,1);>> b=rand(200,1);>> c=rand(200,1);>> scatter(a,b,100,c,'p')>> clear>> x=1:10;>> y=x+rand(size(x);>> z=rand(s

12、ize(x)+rand(size(y);>> scatter3(x,y,z,'filled');>> clear>> x=randn(100,2);>> plotmatrix(x)(5)實驗演示用view、rotate、colordef、colormap、shading、light、lighting、material、surfl等函數(shù)對三維圖形進行精細控制的方法>> clear>> z=peaks(25);>> colordef black;>> colormap hot;>&

13、gt; shading interp;>> surfl(z)>> clear>> 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);>> 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);(6)實驗演示getframe與movie相結(jié)合繪制動畫>> x,y,z=peaks(25);>>surf(x,y,z);>>m=moviein(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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論