24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 256  |  回复: 1

hpuwyb

新虫 (小有名气)

[求助] 错误出在哪里了?

>> 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.(运行后所显示的)怎么来解决啊???
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiegangmai

版主 (职业作家)

我没头衔

优秀版主优秀版主优秀版主

【答案】应助回帖

★ ★ ★ ★
感谢参与,应助指数 +1
hpuwyb: 金币+2 2013-05-10 10:41:04
ben_ladeng: 金币+2, 谢谢交流 2013-05-11 17:21:11
楼主是在出题考大家吗?
第18行应为:
text(19,0.95,['\theta_{max}=', num2str(ThetaMaxDeg,4),'\circ'])

第19行:
ThetaMax Vol是神马东东,中间加个空格表示什么?
fiminbnd是什么,自定义的函数?是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楼2013-05-09 22:42:44
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 hpuwyb 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 333求调剂 +8 阿科逸 2026-03-31 8/400 2026-04-04 16:11 by dongzh2009
[考研] 291求调剂 +4 迷蒙木木 2026-04-01 5/250 2026-04-04 15:59 by sihailian3
[考研] 293分求调剂,外语为俄语 +6 加一一九 2026-03-31 6/300 2026-04-04 14:57 by 聪明的大松鼠
[考研] 283分求调剂 +4 试试看呗 2026-04-04 4/200 2026-04-04 13:00 by tujia213
[考研] 0703求调剂383分 +5 W55j 2026-04-03 5/250 2026-04-04 12:39 by 无际的草原
[考研] 0856调剂 +8 曲听筠 2026-03-30 8/400 2026-04-04 08:46 by tianyyysss
[考研] 265求调剂 +20 梁梁校校 2026-04-01 21/1050 2026-04-04 00:38 by userper
[考研] 350一志愿北京航空航天大学08500材料科学与工程求调剂 +5 kjnasfss 2026-04-03 5/250 2026-04-03 22:29 by 无际的草原
[考研] 考研调剂 +5 小sun要好运 2026-04-03 5/250 2026-04-03 21:43 by 啵啵啵0119
[考研] 275求调剂 +14 waltzh 2026-04-01 14/700 2026-04-03 11:24 by qqq850810
[考研] 抱歉 +5 田洪有 2026-03-30 5/250 2026-04-03 10:24 by linyelide
[考研] 一志愿安徽大学0817化学工程与技术,求调剂 +14 我不是只因 2026-04-02 15/750 2026-04-03 09:49 by 蓝云思雨
[考研] 346求调剂 +5 郑诚乐 2026-04-02 5/250 2026-04-02 16:38 by SZW_UJN
[考研] 085601一志愿中山大学深圳材料工程330求调剂 +8 pipiver 2026-03-30 8/400 2026-04-02 12:01 by ms629
[考研] 求调剂,一志愿 南京航空航天大学 ,080500材料科学与工程学硕,总分289分 +11 @taotao 2026-03-29 11/550 2026-04-02 10:04 by realme321
[考研] 08生物与医药专硕初试346找调剂 +6 dianeeee 2026-04-01 7/350 2026-04-02 08:23 by guoweigw
[考研] 11408 321分求调剂 +3 huchun12138 2026-03-30 4/200 2026-04-01 22:48 by guanxin1001
[考研] 0817化工学硕调剂 +11 努力上岸中! 2026-03-31 11/550 2026-04-01 20:30 by 赖春艳
[考研] 环境工程 085701,267求调剂 +15 minht 2026-03-29 16/800 2026-04-01 10:13 by li_sujuan99
[考研] 材料专硕 085600求调剂 +7 BBQ233 2026-03-30 7/350 2026-03-30 17:44 by oooqiao
信息提示
请填处理意见