(* 微分方程組 *)
dur=(EA/R-KGA/R*Subscript[d,\[Theta]])*
ur+(EA/R*Subscript[d,\[Theta]]+KGA/R*Subscript[d,\[Theta]])*
ue-KGA*Subscript[d,\[Theta]]*phiz;
due=(EA/R*Subscript[d,\[Theta]]-
KGA/R*Subscript[d,\[Theta]])ue+(EA/R*Subscript[
dd,\[Theta]]+KGA/R)*ue-KGA*phiz;
(* 定義變數 *)
myVars={ur,ue,uz,phir,phie,phiz};
(* 定義微分運算子 *)
myOperator=
Flatten[{Subscript[d,\[Theta]]*#->#'[\[Theta]],
Subscript[dd,\[Theta]]*#->#''[\[Theta]],
(* 所有變數都是\[Theta]的函數 *)
#->#[\[Theta]]&/@myVars}&/@myVars];
test1=Coefficient[#,myVars]&/@{dur,due}
test1//MatrixForm
test2=test1.myVars
test2//MatrixForm
ExpandAll@test2/.myOperator//MatrixForm
Mathematica 教學 聯立方程組的係數矩陣
由 戴忠淵 於 2013年11月26日星期二
上午11:08 發表

讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~