24小时热门版块排行榜    

查看: 2214  |  回复: 11
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

wzycrfpxz

新虫 (初入文坛)

[求助] 有谁用过tomlab,帮我看看下面程序哪里出错了。。。。

toms t
toms t_switch1
toms t_switch2
toms t_f
p1 = tomPhase('p1',t,0,t_switch1,4);
p2 = tomPhase('p2',t,t_switch1,t_switch2-t_switch1,4);
p3 = tomPhase('p3',t,t_switch2,t_f-t_switch2,4);
setPhase({p1,p2,p3});

tomStates x1 x2 x3 x4 x5 x6 x7 alpha beita


x0 = {
       t_f == 56
       t_switch1 == 16
       t_switch2 == 35
       icollocate({ x1 == -1900*t/t_f+1900;
                    x2 == 0;
                    x3 == -3100*t/t_f+3100;
                    x4 == -40*t/t_f+40;
                    x5 == -20*t/t_f+20;
                    x6 == 50*t/t_f-50;
                    x7 == -1905*t/t_f+1905;
                    alpha==1.2212*t/t_f-1.2212;
                    beita==0.6981*t/t_f-0.6891}) };
cbox = {
         36<=t_f<=66};
cbnd = { initial ({ x1==1900;x2==0;x3==3100;x4==40;x5==20;x6==-50;x7==1905;
                     alpha==-1.2212;beita==-0.6981})
          final ({x1==0;x2==0;x3==0;x4==0;x5==0;x6==0;x7==1653.6;
                      alpha==0;beita==0})};
ceq = {
      collocate(dot(x1)==x4)
      collocate(dot(x2)==x5)
      collocate(dot(x3)==x6)
      collocate(p1,dot(x4)== 11708/x7*sin(alpha)*cos(beita))
      collocate(p2,dot(x4)== 4390.5/x7*sin(alpha)*cos(beita))
      collocate(p3,dot(x4)== 11708/x7*sin(alpha)*cos(beita))
      collocate(p1, dot(x5)== 11708/x7*sin(beita))
      collocate(p2,dot(x5)==4390.5/x7*sin(beita))
      collocate(p3,dot(x5)==11708/x7*sin(beita))
      collocate(p1,dot(x6)==11708/x7*cos(alpha)*cos(beita)-3.7114)
      collocate(p2,dot(x6)==4390.5/x7*cos(alpha)*cos(beita)-3.7114)
      collocate(p3,dot(x6)==11708/x7*cos(alpha)*cos(beita)-3.7114)
      collocate(p1,dot(x7)==-4.6817)
      collocate(p2,dot(x7)==-1.7556)
      collocate(p3,cot(x7)==-4.6817)};
cco=continuity ({x1,x2,x3,x4,x5,x6,x7,alpha,beita});
objective=t_f;


options=struct;
solution=ezsolve(objective,{cbox,cbnd,ceq,cco},x0,options);
t_plot = linspace(0,subs(t_f,solution),100);
x1_plot = atPoints(t_plot,x1,solution);
x2_plot = atPoints(t_plot,x2,solution);
x3_plot = atPoints(t_plot,x3,solution);
x4_plot = atPoints(t_plot,x4,solution);
x5_plot = atPoints(t_plot,x5,solution);
x6_plot = atPoints(t_plot,x6,solution);
x7_plot = atPoints(t_plot,x7,solution);
alpha_plot = atPoints(t_plot,alpha,solution);
beita_plot = atPoints(t_plot,beita,solution);


clf
subplot(2,1,1)
plot(t_plot,[x1_plot x2_plot]);
legend('x1','x2');
回复此楼

» 收录本帖的淘帖专辑推荐

MATLAB

» 猜你喜欢

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

egbert

金虫 (初入文坛)

您好!十分想知道您是怎么解决tomlab的licence问题的?我在官网注册了,也确认邮件了,但是始终没有给我发licence,可否借楼主的一用?
3楼2013-10-10 10:08:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 12 个回答

egbert

金虫 (初入文坛)

您好。我想问下我下载的tomlab只有tomlab.lic.mexw32,而没有tomlab.lic,没法激活,怎么办?
2楼2013-10-09 19:39:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wzycrfpxz

新虫 (初入文坛)

引用回帖:
3楼: Originally posted by egbert at 2013-10-10 10:08:02
您好!十分想知道您是怎么解决tomlab的licence问题的?我在官网注册了,也确认邮件了,但是始终没有给我发licence,可否借楼主的一用?

你好,我的在实验室,最近在赶工作的事,明天有时间我发你一个。。。你留个邮箱,。。

» 本帖已获得的红花(最新10朵)

4楼2013-10-11 12:28:15
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

egbert

金虫 (初入文坛)

送红花一朵
引用回帖:
4楼: Originally posted by wzycrfpxz at 2013-10-11 12:28:15
你好,我的在实验室,最近在赶工作的事,明天有时间我发你一个。。。你留个邮箱,。。...

wuyanliang456@126.com十分感谢
5楼2013-10-11 14:52:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 288求调剂 +7 于海海海海 2026-03-19 7/350 2026-03-19 15:25 by 丁丁*
[考研] 材料与化工求调剂 +7 为学666 2026-03-16 7/350 2026-03-19 14:48 by 尽舜尧1
[考研] 085600材料与化工求调剂 +6 绪幸与子 2026-03-17 6/300 2026-03-19 13:27 by houyaoxu
[考研] 一志愿中海洋材料工程专硕330分求调剂 +7 小材化本科 2026-03-18 7/350 2026-03-19 10:46 by Linda Hu
[考研] 26调剂/材料/英一数二/总分289/已过A区线 +7 步川酷紫123 2026-03-13 7/350 2026-03-18 17:12 by 尽舜尧1
[考研] 考研求调剂 +3 橘颂. 2026-03-17 4/200 2026-03-17 21:43 by 有只狸奴
[考研] 326求调剂 +5 上岸的小葡 2026-03-15 6/300 2026-03-17 17:26 by ruiyingmiao
[硕博家园] 湖北工业大学 生命科学与健康学院-课题组招收2026级食品/生物方向硕士 +3 1喜春8 2026-03-17 5/250 2026-03-17 17:18 by ber川cool子
[考研] 085601求调剂 +4 Du.11 2026-03-16 4/200 2026-03-17 17:08 by ruiyingmiao
[考研] 考研调剂 +3 淇ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
[考研] 11408 一志愿西电,277分求调剂 +3 zhouzhen654 2026-03-16 3/150 2026-03-17 07:03 by laoshidan
[考研] 机械专硕325,寻找调剂院校 +3 y9999 2026-03-15 5/250 2026-03-16 19:58 by y9999
[考研] 304求调剂 +3 曼殊2266 2026-03-14 3/150 2026-03-16 16:39 by houyaoxu
[考研] 0703一志愿211 285分求调剂 +5 ly3471z 2026-03-13 5/250 2026-03-16 16:16 by 哦哦123
[考研] 277材料科学与工程080500求调剂 +3 自由煎饼果子 2026-03-16 3/150 2026-03-16 14:10 by 运气yunqi
[考研] 327求调剂 +6 拾光任染 2026-03-15 11/550 2026-03-15 22:47 by 拾光任染
[考研] 26考研一志愿中国石油大学(华东)305分求调剂 +3 嘉年新程 2026-03-15 3/150 2026-03-15 13:58 by 哈哈哈哈嘿嘿嘿
[考研] 本科南京大学一志愿川大药学327 +3 麦田耕者 2026-03-14 3/150 2026-03-14 20:04 by 外星文明
[考研] 289求调剂 +3 李政莹 2026-03-12 3/150 2026-03-13 11:02 by 求调剂zz
[考研] 290求调剂 +3 ADT 2026-03-13 3/150 2026-03-13 10:19 by peike
信息提示
请填处理意见