| 查看: 405 | 回复: 3 | ||
[求助]
编写控制程序
|
|
M文件代码如下: function dx=guidance(t,x,u) if 40 elseif 20 elseif 0 end dx=[-10.0211*u*x(1)^2/2200-3.716*3395^2*sin(x(2))/(3395+x(3))^2; -0.837*u*x(1)/2200-3.716*3395^2*cos(x(2))/x(1)/(3395+x(3))^2+x(1)*cos(x(2))/(3395+x(3)); x(1)*sin(x(2)); 3395*x(1)*cos(x(2))/(3395+x(3))]; end 命令行如下: x=ones(1,4);t=1;u=2;dx=guidance(t,x,u); >> x0=[6000;-15/180;125;0]; >> [t,y]=ode45(@guidance,[0,100],x0); 结果报错: Warning: Failure at t=6.283114e-220. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.258037e-234) at time t. > In ode45 at 371 请问该如何解决? 还有一部分是如何在终点时间 tf 时,使x3(tf)=7,x1(tf)=400,请问该如何编写代码? |
» 猜你喜欢
谈谈两天一夜的“延安行”
已经有6人回复
博士申请都是内定的吗?
已经有12人回复
氨基封端PDMS和HDI反应快速固化
已经有11人回复
之前让一硕士生水了7个发明专利,现在这7个获批发明专利的维护费可从哪儿支出哈?
已经有11人回复
论文投稿求助
已经有4人回复
Applied Surface Science 这个期刊。有哪位虫友投过的能把word模板发给我参考一下嘛
已经有3人回复
投稿精细化工
已经有6人回复
ifly21cn
银虫 (初入文坛)
- 应助: 7 (幼儿园)
- 金币: 764.7
- 散金: 10
- 帖子: 35
- 在线: 324.1小时
- 虫号: 1634933
- 注册: 2012-02-22
- 性别: GG
- 专业: 控制理论与方法
2楼2012-11-06 09:14:47
3楼2012-11-08 08:28:51
ifly21cn
银虫 (初入文坛)
- 应助: 7 (幼儿园)
- 金币: 764.7
- 散金: 10
- 帖子: 35
- 在线: 324.1小时
- 虫号: 1634933
- 注册: 2012-02-22
- 性别: GG
- 专业: 控制理论与方法
4楼2012-11-08 10:38:43









回复此楼