| 2 | 1/1 | 返回列表 |
| 查看: 253 | 回復(fù): 1 | |||
[求助]
錯誤出在哪里了?
|
|
>> a=5.0;L=10.0;B=10.0; rho=1000.0;gra=9.81;W=100000.0; ratio=L/a; theta=linspace(0.0,pi/2.0); VoverVw=cos(theta)+0.5*ratio*cos(theta).*(theta); options=optimset('display','off'); figure(1) subplot(1,2,1) plot(theta*180/pi,VoverVw,'k') axis([0.0,90.0,0.0,1.5]) ylabel('V/V_w') xlabel('/theta(degrees)') grid on hold on MaxTheta=inline('1-(cos(theta)+0.5*ratio*cos(theta).*sin(theta))','theta','ratio'); ThetaMaxDeg=fzero(MaxTheta,[0.01,pi/2.0],options,ratio)*180/pi; plot(ThetaMaxDeg,1.0,'sk') text(19,0.95,['\theta_{max}=',num2str(ThetaMaxDeg,4)'\'circ']) ThetaMax Vol=fiminbnd(MaxTheta,0.0,ThetaMaxDeg*pi/180,options,ratio); MaxVol=1-MaxTheta(ThetaMaxVol,ratio); plot(ThetaMaxVol*180.0/pi,MaxVol,'ks') text(10,MaxVol+0.1,['max vol='num2str(MaxVol,4)]) text(10,MaxVol+0.05,['at\theta='num2str(ThetaMaxVol*180/pi,4)'\circ']) subplot(1,2,2) theta=linspace(0.01,ThetamaxDeg*pi/180); h=zeros(1,length(theta)); for i=1:length(theta) r=roots([tan(theta(i))*0.5,a,-a*L]); h(i)=r(2); end plot(theta*180/pi,h) ylabel('h(meters)') xlabel('\theta(degrees)') grid on figure(2) Frod=((B*rho*grav*h.^3)./(6*cos(theta).^2)+0.5*W*L*sin(theta))./(L*sin(theta+acos(cos(theta)/sqrt(2)))); plot(theta*180.0/pi,Frod*le-6 ylabel('F_{rod}(MN)') xlabel('\theta(degrees)') grid on Matrix dimensions must agree.(運(yùn)行后所顯示的)怎么來解決??? |
|
樓主是在出題考大家嗎? 第18行應(yīng)為: text(19,0.95,['\theta_{max}=', num2str(ThetaMaxDeg,4),'\circ']) 第19行: ThetaMax Vol是神馬東東,中間加個空格表示什么? fiminbnd是什么,自定義的函數(shù)?是fminbnd吧? 第23行: text(10,MaxVol+0.05,[num2str(ThetaMaxVol*180/pi,4),'\circ']) 第36行: grav是神馬東東? [ Last edited by xiegangmai on 2013-5-9 at 22:50 ] |

| 2 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 329求調(diào)劑 +4 | 想上學(xué)吖吖 2026-03-19 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 0703化學(xué)調(diào)劑 +10 | 妮妮ninicgb 2026-03-15 | 14/700 |
|
|
[考研] 307求調(diào)劑 +9 | 冷笙123 2026-03-17 | 9/450 |
|
|
[考研] 一志愿南京理工大學(xué)085701資源與環(huán)境302分求調(diào)劑 +3 | 葵梓衛(wèi)隊 2026-03-18 | 5/250 |
|
|
[考研] 288求調(diào)劑,一志愿華南理工大學(xué)071005 +5 | ioodiiij 2026-03-17 | 5/250 |
|
|
[考研] 能源材料化學(xué)課題組招收碩士研究生8-10名 +4 | 脫穎而出 2026-03-16 | 12/600 |
|
|
[考研] 材料與化工求調(diào)劑 +7 | 為學(xué)666 2026-03-16 | 7/350 |
|
|
[考研] 材料考研調(diào)劑 +3 | xwt。 2026-03-19 | 3/150 |
|
|
[考研] 一志愿中海洋材料工程專碩330分求調(diào)劑 +7 | 小材化本科 2026-03-18 | 7/350 |
|
|
[考研] 材料專碩英一數(shù)二306 +5 | z1z2z3879 2026-03-18 | 5/250 |
|
|
[考研] 330求調(diào)劑 +3 | 小材化本科 2026-03-18 | 3/150 |
|
|
[考研] 材料專業(yè)求調(diào)劑 +5 | hanamiko 2026-03-18 | 5/250 |
|
|
[考研] 278求調(diào)劑 +5 | 煙火先于春 2026-03-17 | 5/250 |
|
|
[考研] 296求調(diào)劑 +5 | 大口吃飯 身體健 2026-03-13 | 5/250 |
|
|
[考研] 一志愿蘇州大學(xué)材料工程(085601)專碩有科研經(jīng)歷三項國獎兩個實用型專利一項省級立項 +6 | 大火山小火山 2026-03-16 | 8/400 |
|
|
[考研] 304求調(diào)劑 +4 | ahbd 2026-03-14 | 4/200 |
|
|
[考研] 080500,材料學(xué)碩302分求調(diào)劑學(xué)校 +4 | 初識可樂 2026-03-14 | 5/250 |
|
|
[考研] 中科大材料專碩319求調(diào)劑 +3 | 孟鑫材料 2026-03-13 | 3/150 |
|
|
[考研] 一志愿哈工大材料324分求調(diào)劑 +5 | 閆旭東 2026-03-14 | 5/250 |
|
|
[考研] [0860]321分求調(diào)劑,ab區(qū)皆可 +4 | 寶貴熱 2026-03-13 | 4/200 |
|