24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 2241  |  回复: 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

金虫 (初入文坛)

送红花一朵
引用回帖:
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的回帖
查看全部 12 个回答

egbert

金虫 (初入文坛)

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

egbert

金虫 (初入文坛)

您好!十分想知道您是怎么解决tomlab的licence问题的?我在官网注册了,也确认邮件了,但是始终没有给我发licence,可否借楼主的一用?
3楼2013-10-10 10:08:02
已阅   回复此楼   关注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的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 309求调剂 +8 谁不是少年 2026-03-29 8/400 2026-03-30 00:55 by 我是小康
[考研] 327求调剂 +3 小卡不卡. 2026-03-29 3/150 2026-03-29 22:29 by 无际的草原
[考研] 南京大学化学调剂 +9 景随风 2026-03-29 14/700 2026-03-29 21:22 by chixmc
[考研] 求调剂 +4 QiMing7 2026-03-25 5/250 2026-03-29 21:10 by 唐沐儿
[考研] 化学0703 调剂 306分 一志愿211 +7 26要上岸 2026-03-28 7/350 2026-03-29 20:04 by 无际的草原
[考研] 332求调剂 +8 蕉蕉123 2026-03-28 8/400 2026-03-29 10:46 by 周梓丹
[考研] 调剂求院校招收 +6 鹤鲸鸽 2026-03-28 6/300 2026-03-29 08:15 by fmesaito
[考研] 11408软件工程求调剂 +3 Qiu学ing 2026-03-28 3/150 2026-03-28 21:50 by zhq0425
[考研] 一志愿华北电力大学能动专硕,293,求调剂 +3 15537177284 2026-03-23 5/250 2026-03-28 16:11 by xxxsssccc
[考研] 0703一志愿9,初试成绩:338,四六级已过,有科研经历,求调剂! +4 Zuhui0306 2026-03-25 4/200 2026-03-28 13:07 by 唐沐儿
[考研] 调剂 +3 好好读书。 2026-03-28 3/150 2026-03-28 12:04 by 王保杰33
[考研] 266分求材料化工冶金矿业等专业的调剂 +4 哇呼哼呼哼 2026-03-26 4/200 2026-03-27 17:02 by zhyzzh
[考研] 一志愿 西北大学 总分282 英语一62 求调剂 +7 18419759900 2026-03-25 8/400 2026-03-27 16:38 by 18419759900
[考研] 085600,材料与化工321分,求调剂 +9 大馋小子 2026-03-27 9/450 2026-03-27 14:30 by mmm just
[考研] 085600,材料与化工321分调剂 +4 大馋小子 2026-03-27 6/300 2026-03-27 14:11 by 松花缸1201
[考研] 276求调剂。有半年电池和半年高分子实习经历 +10 材料学257求调剂 2026-03-23 11/550 2026-03-27 10:13 by YCIT- LHL
[考研] 求调剂 +6 林之夕 2026-03-24 6/300 2026-03-27 08:38 by hypershenger
[考研] 284求调剂 +11 junqihahaha 2026-03-26 12/600 2026-03-27 04:37 by wxiongid
[考研] 环境专硕324分求调剂推荐 +5 轩小宁—— 2026-03-26 5/250 2026-03-26 12:05 by i_cooler
[考研] 各位老师您好:本人初试372分 +5 jj涌77 2026-03-25 6/300 2026-03-25 14:15 by mapenggao
信息提示
请填处理意见