24小时热门版块排行榜    

查看: 312  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 基金中了 +12 laoda193707 2026-08-06 12/600 2026-08-07 19:16 by zhendaodan
[基金申请] 关于代码变化问题,想知道的进来 +6 且听虎啸 2026-08-07 9/450 2026-08-07 18:40 by naalan7001
[基金申请] 关于filecode +3 布布和一二 2026-08-07 6/300 2026-08-07 17:51 by 医学老男孩
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] 听说今天filecode变了 +24 布布和一二 2026-08-06 47/2350 2026-08-07 16:02 by zhiyanjiang
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
[论文投稿] 十年后又回来了,论文投稿求助 +4 哈哈114477 2026-08-01 4/200 2026-08-07 14:39 by jgy194592
[基金申请] 大家散了吧,后缀研究没有意义,别浪费时间了,过好目前的每一天,不要焦虑 +5 Tide man 2026-08-06 7/350 2026-08-07 13:11 by 医学老男孩
[基金申请] 关于豆爷回答的JTJC与%2F数量 +4 yang182083 2026-08-06 6/300 2026-08-07 12:43 by 虫友是什么虫
[基金申请] 面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇! +23 低垂的野花 2026-07-31 31/1550 2026-08-07 12:22 by speculiar
[基金申请] filecode +14 等待解的谜 2026-08-06 19/950 2026-08-07 12:20 by wlwhappy
[基金申请] filecode +8 布布和一二 2026-08-06 11/550 2026-08-06 20:41 by tangpu318
[基金申请] 求各位大神看下 100+6 hpkpkpkp 2026-08-05 33/1650 2026-08-06 14:49 by zhiyanjiang
[基金申请] 影响面上的因素 +8 布布和一二 2026-08-05 11/550 2026-08-06 10:41 by 宝贝虫子
[基金申请] 好消息?这个有何含义??? +8 Tide man 2026-08-05 10/500 2026-08-05 16:14 by xmuxiaoyu
[考博] 【2027博士申请】纳米药物递送方向 20+3 13586093586 2026-08-03 4/200 2026-08-05 09:59 by lfy8008
[基金申请] 有没有H口的?有收到消息的吗? +3 超级海虾 2026-08-04 3/150 2026-08-04 17:26 by 学教育滴
[基金申请] 纯娱乐,不喜欢勿喷 +7 Tide man 2026-08-04 10/500 2026-08-04 15:10 by loufangrui
[基金申请] 娱乐 +4 Tide man 2026-08-03 4/200 2026-08-04 11:51 by wgch518
[基金申请] 什么时候能放榜呀? +3 Jacob678 2026-08-03 3/150 2026-08-03 16:14 by gltch
信息提示
请填处理意见