| 2 | 1/1 | 返回列表 |
| 查看: 251 | 回復(fù): 1 | ||
[求助]
錯(cuò)誤出在哪里了?
|
|
>> 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是神馬東東,中間加個(gè)空格表示什么? 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ā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿中國海洋大學(xué),生物學(xué),301分,求調(diào)劑 +5 | 1孫悟空 2026-03-17 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 梁成偉老師課題組歡迎你的加入 +9 | 一鴨鴨喲 2026-03-14 | 11/550 |
|
|
[考研] 311求調(diào)劑 +4 | 冬十三 2026-03-18 | 4/200 |
|
|
[考研] 26調(diào)劑/材料/英一數(shù)二/總分289/已過A區(qū)線 +7 | 步川酷紫123 2026-03-13 | 7/350 |
|
|
[考研] 08工科 320總分 求調(diào)劑 +5 | 梨花珞晚風(fēng) 2026-03-17 | 5/250 |
|
|
[考研] 085601專碩,總分342求調(diào)劑,地區(qū)不限 +5 | share_joy 2026-03-16 | 5/250 |
|
|
[考研] 304求調(diào)劑 +12 | 小熊joy 2026-03-14 | 13/650 |
|
|
[考研] 材料,紡織,生物(0856、0710),化學(xué)招生啦 +3 | Eember. 2026-03-17 | 9/450 |
|
|
[考研] 293求調(diào)劑 +11 | zjl的號(hào) 2026-03-16 | 16/800 |
|
|
[考研] 一志愿南京大學(xué),080500材料科學(xué)與工程,調(diào)劑 +4 | Jy? 2026-03-16 | 4/200 |
|
|
[考研] 302求調(diào)劑 +4 | 小賈同學(xué)123 2026-03-15 | 8/400 |
|
|
[論文投稿] 有沒有大佬發(fā)小論文能帶我個(gè)二作 +3 | 增銳漏人 2026-03-17 | 4/200 |
|
|
[考研] 考研調(diào)劑 +3 | 淇ya_~ 2026-03-17 | 5/250 |
|
|
[考研] 304求調(diào)劑 +5 | 素年祭語 2026-03-15 | 5/250 |
|
|
[考研] 277材料科學(xué)與工程080500求調(diào)劑 +3 | 自由煎餅果子 2026-03-16 | 3/150 |
|
|
[考研] 326求調(diào)劑 +3 | mlpqaz03 2026-03-15 | 3/150 |
|
|
[考研] 288求調(diào)劑 +4 | 奇點(diǎn)0314 2026-03-14 | 4/200 |
|
|
[考研] 中科大材料與化工319求調(diào)劑 +3 | 孟鑫材料 2026-03-14 | 3/150 |
|
|
[考研] 本科南京大學(xué)一志愿川大藥學(xué)327 +3 | 麥田耕者 2026-03-14 | 3/150 |
|
|
[考研] 中科大材料專碩319求調(diào)劑 +3 | 孟鑫材料 2026-03-13 | 3/150 |
|