MATLAB: Symbolic substitution for multiple variables

symbolic

Hi,
I wanted some explanation on the captioned. Say my N is a 6×6 matrix with 5 symbolic variables and I want to evaluate N at one go, for 5 different values of the variables. How do I do that using subs? Thank you.

Best Answer

A simplified example:
syms a b c d e
M = [a b c; d e b; e c a];
Ms = subs(M, {a b c d e}, {1 3 5 7 9});
Ms =
[ 1, 3, 5]
[ 7, 9, 3]
[ 9, 5, 1]