| 2 | 1/1 | 返回列表 |
| 查看: 252 | 回復(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)行后所顯示的)怎么來(lái)解決。?? |
|
樓主是在出題考大家嗎? 第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ā)表 | |
|---|---|---|---|---|
|
[考研]
|
不想起名字112 2026-03-19 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 265求調(diào)劑 +3 | 梁梁校校 2026-03-19 | 3/150 |
|
|
[考研] 一志愿西安交通大學(xué)材料工程專業(yè) 282分求調(diào)劑 +5 | 楓橋ZL 2026-03-18 | 7/350 |
|
|
[考研] 一志愿 西北大學(xué) ,070300化學(xué)學(xué)碩,總分287,雙非一本,求調(diào)劑。 +3 | 晨昏線與星海 2026-03-19 | 3/150 |
|
|
[考研] 材料080500調(diào)劑求收留 +4 | 一顆meteor 2026-03-13 | 4/200 |
|
|
[考研] 材料專碩英一數(shù)二306 +5 | z1z2z3879 2026-03-18 | 5/250 |
|
|
[考研] 344求調(diào)劑 +6 | knight344 2026-03-16 | 7/350 |
|
|
[考研] 085600材料與化工 +5 | 安全上岸! 2026-03-16 | 5/250 |
|
|
[考研] 311求調(diào)劑 +11 | 冬十三 2026-03-15 | 12/600 |
|
|
[考研] 材料專碩306英一數(shù)二 +10 | z1z2z3879 2026-03-16 | 13/650 |
|
|
[考研] 280求調(diào)劑 +6 | 咕嚕曉曉 2026-03-18 | 7/350 |
|
|
[考博] 環(huán)境領(lǐng)域全國(guó)重點(diǎn)實(shí)驗(yàn)室招收博士1-2名 +3 | QGZDSYS 2026-03-13 | 5/250 |
|
|
[考研] 0703化學(xué)336分求調(diào)劑 +6 | zbzihdhd 2026-03-15 | 7/350 |
|
|
[考研] 268求調(diào)劑 +6 | 簡(jiǎn)單點(diǎn)0 2026-03-17 | 6/300 |
|
|
[考研] 296求調(diào)劑 +5 | 大口吃飯 身體健 2026-03-13 | 5/250 |
|
|
[考研] 268求調(diào)劑 +8 | 一定有學(xué)上- 2026-03-14 | 9/450 |
|
|
[考研] 308求調(diào)劑 +4 | 是Lupa啊 2026-03-16 | 4/200 |
|
|
[考研] 26考研求調(diào)劑 +6 | 丶宏Sir 2026-03-13 | 6/300 |
|
|
[考研] 一志愿蘇州大學(xué)材料工程(085601)專碩有科研經(jīng)歷三項(xiàng)國(guó)獎(jiǎng)兩個(gè)實(shí)用型專利一項(xiàng)省級(jí)立項(xiàng) +6 | 大火山小火山 2026-03-16 | 8/400 |
|
|
[考研] 326求調(diào)劑 +4 | 諾貝爾化學(xué)獎(jiǎng)覬?/a> 2026-03-15 | 7/350 |
|