syms with function handler
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Number Theory in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!