24小时热门版块排行榜    

查看: 533  |  回复: 1

lolo123

木虫 (小有名气)

[求助] matlab程序的一个问题求助

一个计算程序前面的一段
syms cell A C D lmt a0 h1 k1 l1 h2 k2 l2 h3 k3 l3 h4 k4 l4 h5 k5 l5 h6 k6 l6 j101 j102 j103 th1 th2 th3 bgk101 bgk102 bgk103 bgk1 bgk2 bgk3 aef1 aef2 aef3 c0 gama1 gama2 gama3 delt1 delt2 delt3 d1 d2 d3 IN;
lmt= 0.15406;
t=96;
IN=[    101 43.246 0.082;
        102 54.356 0.087;
        103 70.119 0.119;
        002 36.325 0.091;
        100 39.016 0.08;
        110 70.659 0.107];

h1=fix(IN(1,1)/100);
k1=fix(IN(1,1)/10)-fix(IN(1,1)/100)*10;
l1=fix(IN(1,1))-fix(IN(1,1)/10)*10;
j101=IN(1,2);
bgk101=IN(1,3);
h2=fix(IN(2,1)/100);
k2=fix(IN(2,1)/10)-fix(IN(2,1)/100)*10;
l2=fix(IN(2,1))-fix(IN(2,1)/10)*10;
j102=IN(2,2);
bgk102=IN(2,3);
h3=fix(IN(3,1)/100);
k3=fix(IN(3,1)/10)-fix(IN(3,1)/100)*10;
l3=fix(IN(3,1))-fix(IN(3,1)/10)*10;
j102=IN(3,2);
bgk102=IN(3,3);

th1=IN(4,2);bgk1=IN(4,3);
th2=IN(5,2);bgk2=IN(5,3);
th3=IN(6,2);bgk3=IN(6,3);

d1=lmt/(2*sin(j101*pi/360));
d2=lmt/(2*sin(j102*pi/360));
d3=lmt/(2*sin(j103*pi/360));

aef1=h1^2+h1*k1+l1^2;
aef2=h2^2+h2*k2+l2^2;
aef3=h3^2+h3*k3+l3^2;

gama1=l1^2;
gama2=l2^2;
gama3=l3^2;

delt1=sin(j101*pi/180)^2*(1/sin(j101*pi/360)+1/(j101*pi/360));
delt2=sin(j102*pi/180)^2*(1/sin(j102*pi/360)+1/(j102*pi/360));
delt3=sin(j103*pi/180)^2*(1/sin(j103*pi/360)+1/(j103*pi/360));

j101=sin(j101*pi/360)^2;
j102=sin(j102*pi/360)^2;
j103=sin(j103*pi/360)^2;

M1=aef1*j101+aef2*j102+aef3*j103;
M2=gama1*j101+gama2*j102+gama3*j103;
M3=delt1*j101+delt2*j102+delt3*j103;

M11=aef1^2+aef2^2+aef3^2;
M12=gama1*aef1+gama2*aef2+gama3*aef3;
M13=delt1*aef1+delt2*aef2+delt3*aef3;

M21=aef1*gama1+aef2*gama2+aef3*gama3;
M22=gama1^2+gama2^2+gama3^2;
M23=gama1*delt1+gama2*delt2+gama3*delt3;

M31=aef1*delt1+aef2*delt2+aef3*delt3;
M32=gama1*delt1+gama2*delt2+gama3*delt3;
M33=delt1^2+delt2^2+delt3^2;

MP=[M11 M12 M13;
M21 M22 M23;
M31 M32 M33];
MA=[M1  M12 M13;
M2  M22 M23;
M3  M32 M33];
MC=[M11 M1  M13;
     M21 M2  M23;
     M31 M3  M33];
MD=[M11 M12 M1 ;
M21 M22 M2 ;
M31 M32 M3 ];
MP=det(MP);
MA=det(MA);
MC=det(MC);
MD=det(MD);

A=MA/MP;
C=MC/MP;
D=MD/MP;

a0=lmt/sqrt(3*A);
c0=lmt/sqrt(4*C);

if C<0
rh121=l1^2;
rh122=l2^2;
Q121=3*a0^2/(4*d1^2);
Q122=3*a0^2/(4*d2^2);
P1211=2;
P1212=rh121+rh122;
P1221=P1212;
P1222=rh121^2+rh122^2;
P121=Q121+Q122;
P122=Q121*rh121+Q122*rh122;
PP12=[P1211 P1212;
P1221 P1222];
PQ12=[P121 P1212;
P122 P1222];
PR12=[P1211 P121;
P1221 P122];
PP12=det(PP12);
PQ12=det(PQ12);
PR12=det(PR12);
R12=PR12/PP12;
c012=sqrt(0.75*a0^2/R12);

rh131=l1^2;
rh132=l3^2;
Q131=3*a0^2/(4*d1^2);Q132=3*a0^2/(4*d3^2);
P1311=2;
P1312=rh131+rh132;
P1321=P1312;
P1322=rh131^2+rh132^2;
P131=Q131+Q132;
P132=Q131*rh131+Q132*rh132;
PP13=[P1311 P1312;
P1321 P1322];
PQ13=[P131 P1312;
P132 P1322];
PR13=[P1311 P131;
P1321 P132];
PP13=det(PP13);
PQ13=det(PQ13);
PR13=det(PR13);
R13=PR13/PP13;
c013=sqrt(0.75*a0^2/R13);

rh231=l2^2;rh232=l3^2;
Q231=3*a0^2/(4*d2^2);
Q232=3*a0^2/(4*d3^2);
P2311=2;
P2312=rh231+rh232;
P2321=P2312;P2322=rh231^2+rh232^2;
P231=Q231+Q232;
P232=Q231*rh231+Q232*rh232;
PP23=[P2311 P2312;
P2321 P2322];
PQ23=[P231 P2312;
P232 P2322];
PR23=[P2311 P231;
P2321 P232];
PP23=det(PP23);
PQ23=det(PQ23);
PR23=det(PR23);
R23=PR23/PP23;
c023=sqrt(0.75*a0^2/R23);
c0=(c012+c013+c023)/3;
end

a0=a0*10;
c0=c0*10;

format long
cell=[a0 c0];
这时出现 Undefined function or method 'lt' for input arguments of type 'sym'. 我的程序里没有lt这个参数,为什么会出现这种情况?我的金币不是很多,先谢谢了。
回复此楼

» 猜你喜欢

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

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

csgt0

荣誉版主 (著名写手)

彩色挂图

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
lolo123: 金币+30, ★★★★★最佳答案, 谢谢 2012-05-12 10:45:00
j103没有赋值,给的两个j102,估计你写错了
showmethemoney
2楼2012-05-09 14:27:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 lolo123 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 材料与化工(0856)304求 B区 调剂 +3 邱gl 2026-03-21 3/150 2026-03-21 13:47 by lature00
[考研] 332求调剂 +3 凤凰院丁真 2026-03-20 3/150 2026-03-21 10:27 by luoyongfeng
[考研] 08工科 320总分 求调剂 +6 梨花珞晚风 2026-03-17 6/300 2026-03-21 03:40 by JourneyLucky
[考研] 308求调剂 +3 阿姐阿姐家啊 2026-03-18 3/150 2026-03-20 23:24 by JourneyLucky
[考研] 317求调剂 +5 申子申申 2026-03-19 9/450 2026-03-20 22:26 by JourneyLucky
[考研] 中南大学化学学硕337求调剂 +3 niko- 2026-03-19 6/300 2026-03-20 21:58 by luoyongfeng
[考研] A区线材料学调剂 +5 周周无极 2026-03-20 5/250 2026-03-20 21:33 by laoshidan
[考研] 材料学求调剂 +4 Stella_Yao 2026-03-20 4/200 2026-03-20 20:28 by ms629
[考研] 一志愿吉林大学材料学硕321求调剂 +11 Ymlll 2026-03-18 15/750 2026-03-20 19:40 by 丁丁*
[考研] 261求B区调剂,科研经历丰富 +3 牛奶很忙 2026-03-20 4/200 2026-03-20 19:34 by JourneyLucky
[考研] 298-一志愿中国农业大学-求调剂 +9 手机用户 2026-03-17 9/450 2026-03-20 14:24 by 无懈可击111
[考博] 申博26年 +3 八6八68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[考研] 085601专硕,总分342求调剂,地区不限 +5 share_joy 2026-03-16 5/250 2026-03-18 14:48 by haxia
[考研] 0854可跨调剂,一作一项核心论文五项专利,省、国级证书40+数一英一287 +8 小李0854 2026-03-16 8/400 2026-03-18 14:35 by 搏击518
[考研] 0703化学336分求调剂 +6 zbzihdhd 2026-03-15 7/350 2026-03-18 09:53 by zhukairuo
[考博] 26申博 +4 八6八68 2026-03-16 4/200 2026-03-17 13:00 by 轻松不少随
[考研] 考研调剂 +3 淇ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
[考研] 277材料科学与工程080500求调剂 +3 自由煎饼果子 2026-03-16 3/150 2026-03-16 14:10 by 运气yunqi
[考研] 085601材料工程315分求调剂 +3 yang_0104 2026-03-15 3/150 2026-03-15 10:58 by peike
[考研] 本科南京大学一志愿川大药学327 +3 麦田耕者 2026-03-14 3/150 2026-03-14 20:04 by 外星文明
信息提示
请填处理意见