复赛+matlab程序.docx

上传人:b****2 文档编号:3522547 上传时间:2023-05-06 格式:DOCX 页数:49 大小:28.07KB
下载 相关 举报
复赛+matlab程序.docx_第1页
第1页 / 共49页
复赛+matlab程序.docx_第2页
第2页 / 共49页
复赛+matlab程序.docx_第3页
第3页 / 共49页
复赛+matlab程序.docx_第4页
第4页 / 共49页
复赛+matlab程序.docx_第5页
第5页 / 共49页
复赛+matlab程序.docx_第6页
第6页 / 共49页
复赛+matlab程序.docx_第7页
第7页 / 共49页
复赛+matlab程序.docx_第8页
第8页 / 共49页
复赛+matlab程序.docx_第9页
第9页 / 共49页
复赛+matlab程序.docx_第10页
第10页 / 共49页
复赛+matlab程序.docx_第11页
第11页 / 共49页
复赛+matlab程序.docx_第12页
第12页 / 共49页
复赛+matlab程序.docx_第13页
第13页 / 共49页
复赛+matlab程序.docx_第14页
第14页 / 共49页
复赛+matlab程序.docx_第15页
第15页 / 共49页
复赛+matlab程序.docx_第16页
第16页 / 共49页
复赛+matlab程序.docx_第17页
第17页 / 共49页
复赛+matlab程序.docx_第18页
第18页 / 共49页
复赛+matlab程序.docx_第19页
第19页 / 共49页
复赛+matlab程序.docx_第20页
第20页 / 共49页
亲,该文档总共49页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

复赛+matlab程序.docx

《复赛+matlab程序.docx》由会员分享,可在线阅读,更多相关《复赛+matlab程序.docx(49页珍藏版)》请在冰点文库上搜索。

复赛+matlab程序.docx

复赛+matlab程序

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('C:

\Users\asus\Desktop\附件.bmp');

imshow(A)

axison

holdon

set(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.-‘);

end

1.set(gca,'ydir',2'reverse')

2.p=polyfit(x,y,3)

3.y=polyval(p,x);

[x,y]=ginput1

data=[];

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.0000270.0000316.0000326.0000273.0000236.0000206.0000187.0000];

y=[125.0000133.0000147.0000155.0000155.0000142.000089.000066.000065.000076.000091.0000];

A=imread('C:

\Users\Administrator\Desktop\附件.bmp');

imshow(A)

axison

holdon

[x,y]=ginput(10)

三维图的程序

A=[

];

x=A(:

1);

y=A(:

2);

z=A(:

3);

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)

holdon

axis([05.1205.1208])

figure,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;clearyx0y0

x0=x2;y0=y2;

n=length(x0)

x=linspace(x0

(1),x0(n),1000);

y=interp1(x0,y0,x,’linspace’);

plot(x,y);axisequal;axis([05120512]);

A=imread('C:

\Users\Administrator\Desktop\附件.bmp');

imshow(A)

axison

holdon

%等高线1三次样条插值程序

t=[99100103105109112116122126134137139141151154163165176179190193204208212221226233241247254262270];

p=[105111117121126130134140143150152153154161162168170175177184186192194196199201200199198196194194];

x=99:

1:

270;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

%等高线3三次样条插值程序

t=[146154157160164168173177183188193202210217223231237247256267273280287296301304311316327333340346351356361365368371375376];

p=[11582797572686663595654514947464544434342444546474849505358626569737782889498108123];

x=146:

0.1:

376;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

t=[146147149152155157161164168171175179188191194204208211220222228233240246255280288296];

p=[114120124128132136139142146148150153158160162166168169171171172173174173173170169168];

x=146:

0.1:

296;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

%等高线4三次样条插值程序

t=[162,164,168,172,178,184,187,196,209,227,246,252,259,264,270,277,284,291,297,302,307,314,321,327,334,339,345,351,354];

p=[108,118,125,132,140,144,148,152,158,162,163,163,163,163,162,161,160,159,158,157,156,154,152,150,147,143,139,134,128];

x=162:

1:

354;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

%等高线5三次样条插值程序

t=[179181183186190194198202205211216223229236];

p=[109100978986828079767371696666];

x=179:

1:

236;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

t=[179182184188194198202208212220226231239264272278288];

p=[109124127132137141143146148151153154154154154153151];

x=179:

1:

288;

y=interp1(t,p,x,'spline');

plot(x,y)

holdon

A=[

116.0855059.4580

237.2685059.4580

328.1565059.4580

378.6495059.4580

469.5365059.4580

570.5235049.3590

661.415049.3590

732.1015059.4580

833.0875059.4580

903.7775059.4580

964.3695049.3590

994.6655019.0630

974.4674928.1760

893.6794867.5840

863.3834837.2880

822.9884766.5980

792.6924817.0910

812.894857.4850

772.4954928.1760

722.0024786.7950

701.8054786.7950

651.3124827.1890

610.9174867.5840

590.724877.6820

479.6354918.0770

459.4384827.1890

479.6354796.8930

419.0434806.9920

348.3534847.3870

338.2544857.4850

277.6634887.7810

206.9724907.9780

196.8744827.1890

186.7754786.7950

126.1834796.8930

105.9864847.3870

75.694897.880

55.4934907.9780

55.4934907.9780

55.4934827.1890

55.4934766.5980

35.2964746.40

35.2964665.6110

95.8884645.4140

146.3814655.5130

156.4794655.5130

237.2684655.5130

388.7484655.5130

408.9454655.5130

469.5364655.5130

479.6354655.5130

570.5234635.3160

631.1144615.1180

631.1144615.1180

641.2134564.6250

600.8194524.2310

600.8194493.9350

580.6214423.2450

570.5234362.6530

540.2274362.6530

469.5364403.0470

459.4384443.4420

388.7484463.6390

307.9594473.7380

277.6634473.7380

206.9724483.8360

105.9864423.2450

146.3814413.1460

237.2684413.1460

287.7614352.5540

116.0854362.6530

75.694332.3570

156.4794332.3570

247.3674332.3570

338.2544342.4560

348.3534342.4560

489.7344332.3570

509.9314312.160

550.3254201.0750

600.8194150.5820

580.6214110.1870

479.6354130.3850

378.6494130.3850

247.3674110.1870

156.4794039.4970

136.2824029.3980

75.694019.30

45.3944019.30

45.3943978.9050

45.3943968.8070

75.693958.7080

116.0853958.7080

206.9723948.6090

237.2683948.6090

328.1563968.8070

338.2543968.8070

449.3393958.7080

459.4383958.7080

489.7343958.7080

530.1283948.6090

520.033948.6090

540.2273898.1160

590.723847.6230

509.9313847.6230

429.1423857.7220

307.9593877.9190

217.0713847.6230

146.3813857.7220

126.1833867.8210

95.8883837.5250

75.693807.2290

75.693736.5380

105.9863736.5380

146.3813736.5380

176.6773736.5380

257.4653746.6370

307.9593726.440

378.6493696.1440

469.5363655.750

550.3253655.750

621.0163655.750

661.413655.750

752.2983635.5520

782.5943635.5520

802.7913605.2560

752.2983524.4670

772.4953473.9740

903.7773383.0870

964.3693362.890

964.3693362.890

1055.2563322.4950

1085.5523261.9030

974.4673261.9030

873.4813272.0020

742.1993302.2980

651.3123342.6920

540.2273322.4950

479.6353312.3960

338.2543312.3960

237.2683342.6920

186.7753322.4950

116.0853150.8190

85.7893100.3250

55.4933019.5360

277.6632948.8460

378.6492948.8460

469.5363029.6350

681.6073080.1280

843.1853009.4380

1045.1583029.6350

1045.1583039.7340

1237.0323039.7340

1206.7363090.2270

1196.6373140.720

1085.5523261.9030

1247.133231.6070

1297.6233140.720

1388.5113059.9310

1499.5962969.0430

1519.7932938.7480

1580.3852969.0430

1640.9762958.9450

1661.1742979.1420

1711.6672938.7480

1691.4692938.7480

1529.8922878.1560

1570.2862787.2680

1519.7932736.7750

1459.2012676.1830

1418.8072605.4930

1711.6672878.1560

1711.6672767.0710

1651.0752645.8880

1560.1872565.0990

1449.1032494.4080

1368.3142443.9150

1277.4262383.3230

1206.7362342.9290

1095.6512171.2520

1075.4542120.7590

934.0732060.1680

893.6791817.8010

752.2981938.9840

752.2982110.6610

681.6072262.140

570.5232363.1260

439.2412353.0280

388.7482140.9570

267.5642292.4360

156.4792464.1120

55.4932322.7320

85.7892211.6470

95.8882060.1680

247.3671969.280

610.9171928.8860

489.7341827.8990

348.3531888.4910

126.1831999.5760

116.0851797.6040

116.0851615.8280

307.9591494.6450

368.551494.6450

459.4381474.4480

560.4241423.9550

621.0161383.560

681.6071333.0670

752.2981272.4750

792.6921262.3770

893.6791221.9820

843.1851272.4750

812.891383.560

782.5941565.3350

641.2131737.0120

499.8321494.6450

439.2411232.0810

479.6351181.5880

600.8191050.3060

893.6791030.1080

105.9861434.0530

469.536959.4180

227.17979.6150

883.581060.4040

530.128868.5310

661.41949.320

833.0871060.4040

1247.131009.9110

1479.3981060.4040

1610.681090.70

1721.7651100.7990

1873.2451050.3060

2277.1891100.7990

2357.9781211.8840

2458.9641272.4750

2660.9371434.0530

2660.9371454.250

2761.9231575.4340

2570.0491464.3490

2428.6691383.560

2267.0911302.7710

2327.6821292.6730

2610.4441454.250

2812.4161595.6310

2913.4021747.110

2984.0931797.6040

3014.3891858.1950

3054.7831938.9840

3064.8822029.8720

3074.982130.8580

3044.6842282.3370

3014.3892524.7040

3004.292676.1830

3044.6842817.5640

3085.0792928.6490

3034.5862989.2410

2862.9093019.5360

2772.0223019.5360

2660.9372969.0430

2640.742807.4650

2691.2332706.4790

2792.2192575.1970

2903.3042544.9010

2963.8952565.0990

2883.1072726.6770

2852.8112817.5640

2943.6982666.0850

2933.62474.2110

2953.7972443.9150

2671.0362868.0570

2559.9512918.550

2408.4712928.6490

2256.9922928.6490

2600.3452868.0570

3085.0792625.690

3095.1782504.5070

3074.982393.4220

3064.8822262.140

3024.4872110.6610

3155.7691878.3930

3216.3611888.4910

3246.6571827.8990

3367.841726.9130

3458.7281636.0260

3428.4321605.730

3287.0511575.4340

3135.5721555.2370

3044.6841524.9410

2943.6981383.560

2893.2051312.870

2933.61282.5740

2984.0931282.5740

3236.5581302.7710

3287.0511312.870

3569.8131272.4750

3731.3911262.3770

3721.2921333.0670

3559.7141454.250

3307.2491373.4620

3226.461292.6730

3074.981201.7850

2963.8951161.3910

2731.6271080.6020

2701.331929.1220

2761.923848.3330

3024.487828.1360

3196.164828.1360

3509.221858.4320

3791.9

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 考试认证 > 公务员考试

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2