matlab符号计算syms s1 s2 t f ps1=solve('2*3^(1/2)*cos(t)*sin(f)-2+2*cos(t)*cos(f)-3^(1/2)*sin(p)*sin(t)*cos(f)+sin(p)*sin(t)*sin(f)=0','f');s2=simplify(s1)结果为什么是2行2列,请各位好手帮忙这是我算的,为什么和你们不一
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 02:37:36
matlab符号计算syms s1 s2 t f ps1=solve('2*3^(1/2)*cos(t)*sin(f)-2+2*cos(t)*cos(f)-3^(1/2)*sin(p)*sin(t)*cos(f)+sin(p)*sin(t)*sin(f)=0','f');s2=simplify(s1)结果为什么是2行2列,请各位好手帮忙这是我算的,为什么和你们不一
matlab符号计算
syms s1 s2 t f p
s1=solve('2*3^(1/2)*cos(t)*sin(f)-2+2*cos(t)*cos(f)-3^(1/2)*sin(p)*sin(t)*cos(f)+sin(p)*sin(t)*sin(f)=0','f');
s2=simplify(s1)
结果为什么是2行2列,请各位好手帮忙
这是我算的,为什么和你们不一样,很复杂的结果,而且不是两行一列,用逗号隔开
matlab符号计算syms s1 s2 t f ps1=solve('2*3^(1/2)*cos(t)*sin(f)-2+2*cos(t)*cos(f)-3^(1/2)*sin(p)*sin(t)*cos(f)+sin(p)*sin(t)*sin(f)=0','f');s2=simplify(s1)结果为什么是2行2列,请各位好手帮忙这是我算的,为什么和你们不一
syms s1 s2 t f p
s1=solve('2*3^(1/2)*cos(t)*sin(f)-2+2*cos(t)*cos(f)-3^(1/2)*sin(p)*sin(t)*cos(f)+sin(p)*sin(t)*sin(f)=0','f');
s2=simplify(s1)
s2 =
2*atan((3^(1/2)*tan(p/2)^2 - 3^(1/2)*tan(p/2)^2*tan(t/2)^2 + 2*tan(p/2)*tan(t/2) - 3^(1/2)*tan(t/2)^2 + 3^(1/2) + (3*tan(p/2)^4*tan(t/2)^4 - 10*tan(p/2)^4*tan(t/2)^2 + 3*tan(p/2)^4 + 6*tan(p/2)^2*tan(t/2)^4 - 4*tan(p/2)^2*tan(t/2)^2 + 6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+ 3)^(1/2))/(2*tan(p/2)^2 - 2*3^(1/2)*tan(t/2)*tan(p/2) + 2))
>> whos s1
Name Size Bytes Class Attributes
s1 2x1 176 sym
>> whos s2
Name Size Bytes Class Attributes
s2 2x1 176 sym
>> size(s2)
ans =
2 1
是两行一列的啊!
是两行一列,你看错了吧