资源描述:
《复赛+matlab程序》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、x=[90095012001550180020002350265030003100340034003100265024002300220023002510];y=[4020190023002800305031503200330033503400355037003650360036502700390040001130];z=[04.5520.8408016.5642.4366.2588.6793.92117.9161.7206233.7369.3291.6316.1355379.5400];Plot3(x,y,z)%读图A=imread('
2、C:UsersasusDesktop附件.bmp');imshow(A)axisonholdonset(gca,'ydir',2'reverse')holdon;set(gcf,’units’,’normalized’,’position’,[0011]);[b,1]=Aboundaries(A);Fori=1:length(b);X=b{i};Plot(x(:,2),x(:,1),’r.-‘);end1.set(gca,'ydir',2'reverse')2.p=polyfit(x,y,3)3.y=polyval(p,x);[x
3、,y]=ginput1data=[];x=data(:,1);y=data(:,2);z=data(:,3);scatter(T,D,5,K)%散点图[X,Y,Z]=griddata(T,D,K,linspace(min(T),max(T))',linspace(min(D),max(D)),'v4');%插值figure,surf(X,Y,Z)%三维曲面figure,contourf(X,Y,Z)%等高线图pcolor(X,Y,Z);shadinginterp%伪彩色图x=[182.0000188.0000206.0000234.000
4、0270.0000316.0000326.0000273.0000236.0000206.0000187.0000];y=[125.0000133.0000147.0000155.0000155.0000142.000089.000066.000065.000076.000091.0000];A=imread('C:UsersAdministratorDesktop附件.bmp');imshow(A)axisonholdon[x,y]=ginput(10)三维图的程序A=[];x=A(:,1);y=A(:,2);z=A(:,3);
5、minx=min(x);maxx=max(x);miny=min(y);maxy=max(y);[X,Y,Z]=griddata(x,y,z,linspace(minx,maxx)',linspace(miny,maxy),'v4');%插值[X,Y]=meshgrid(0:.025:5.12);Z=peaks(X,Y);figure,contourf(X,Y,Z)%等高线图[XI,YI]=meshgrid(0:.0125:5.12);mesh(X,Y,Z)holdonaxis([05.1205.1208])http://www.cnbl
6、ogs.com/begtostudy/archive/2010/08/03/1791084.htmlhttp://wenku.baidu.com/view/cb74b3eaaeaad1f346933fae.htmlfigure,contourf(X,Y,Z)%等高线图第一题程序x0=x1;y0=y1;n=length(x0)x=linspace(x0(1),x0(n),1000);y=interp1(x0,y0,x,’linspace’);plot(x,y);hold;clearyx0y0x0=x2;y0=y2;n=length(x0)x
7、=linspace(x0(1),x0(n),1000);y=interp1(x0,y0,x,’linspace’);plot(x,y);axisequal;axis([05120512]);A=imread('C:UsersAdministratorDesktop附件.bmp');imshow(A)axisonholdon%等高线1三次样条插值程序t=[991001031051091121161221261341371391411511541631651761791901932042082122212262332412472542
8、62270];p=[10511111712112613013414014315015215315416116216817017517718418619219419619920120019919