Assigning values to defined symbolic variables afterwards
80 ビュー (過去 30 日間)
古いコメントを表示
syms x ar la
C_I=[((1+(4/3)*ar*sin(x))/8)*la,0,0,0;0,((1-(4/3)*ar*cos(x))/8)*la,0,0; 0,0,((1-(4/3)*ar*sin(x))/8)*la,0; 0,0,0,((1+(4/3)*ar*cos(x))/8)*la];
Lb=[1,-1,cos(x),sin(x);1,1,sin(x),-cos(x);1,-1,-cos(x),-sin(x);1,1,-sin(x),cos(x)];
Lb_1=inv(Lb);
Cm=Lb_1*(2*(diff(Lb,x))+(C_I*Lb));
How can you calculate the Cm matris while x=0 ? What code should I write next?
0 件のコメント
採用された回答
Star Strider
2022 年 2 月 19 日
Try this —
syms x ar la
sympref('AbbreviateOutput',false);
C_I=[((1+(4/3)*ar*sin(x))/8)*la,0,0,0;0,((1-(4/3)*ar*cos(x))/8)*la,0,0; 0,0,((1-(4/3)*ar*sin(x))/8)*la,0; 0,0,0,((1+(4/3)*ar*cos(x))/8)*la]
Lb=[1,-1,cos(x),sin(x);1,1,sin(x),-cos(x);1,-1,-cos(x),-sin(x);1,1,-sin(x),cos(x)]
Lb_1=inv(Lb)
Cm=Lb_1*(2*(diff(Lb,x))+(C_I*Lb))
Cm_x0 = subs(Cm,{x},{0}) % Substitute 0 for 'x'
Cm_x0 = simplify(Cm_x0, 500) % Simplified
.
6 件のコメント
Star Strider
2022 年 2 月 19 日
The μ and γ are new.
How are they defined, especially in the context of the other variables?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!