|
符号运算,真不容易。
>> syms sigmaz M I c m y b S E;
>> sigmaz=M/I*c-(1/3*m-(y/b)^2)*S;
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
mtimes at line 54 column 5
>> f=int(sigmaz^2/E,y,-b,b);
>> f
f = (sym)
2 / 2 \ / 2 2 2 2 2\
2*S *b 2*b*\- 2*I*S *m + 6*M*S*c/ 2*b*\I *S *m - 6*I*M*S*c*m + 9*M *c /
------ + -------------------------- + --------------------------------------
5*E 9*E*I 2
9*E*I
>> simplify(f)
ans = (sym)
/ 2 2 2 2 2 2 2\
2*b*\5*I *S *m + 9*I *S - 30*I*M*S*c*m - 10*I*S*(I*S*m - 3*M*c) + 45*M *c /
-----------------------------------------------------------------------------
2
45*E*I
>> collect(f,S)
ans = (sym)
2 / 2 \ / 2 2 2 2 2\
2*S *b 2*b*\- 2*I*S *m + 6*M*S*c/ 2*b*\I *S *m - 6*I*M*S*c*m + 9*M *c /
------ + -------------------------- + --------------------------------------
5*E 9*E*I 2
9*E*I
显示走样了。
collect函数,合并同类项,好像是没啥效果。
不过,也帮了大忙。
感谢。
|
|