syms with function handler
古いコメントを表示
This is my Matlab code. I am trying to simply substitute the M=[0 0 1] into n like this n1=0 n2=0 n3=1 but the answer comes without the substitution happening. What should I do to fix this?
M=zeros(1,3)
M(1,3) = 1;
syms n [1 5]
f=@(n) n1+6*n2+2*n3
a=f(M)
---------
n =
[ n1, n2, n3]
a =
n1 + 6n2 + 2n3
How can I get
a= 0+0+2
if the substitution happens
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!