syms with function handler
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Number Theory dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!