wanna creat a matrix of unknowns and write some equations with those unknowns and then take the matrix of coefficients

1 view (last 30 days)
I want to creat a matrix of unknowns like below
t(1,1) t(1,2)
t(2,1) t(2,2)
then i want to write some equations with this like
2*t(1,1) + 3*t(1,2)
then take the matrix of coefficients : a=[2 3]
I tried syms t(i,j) but it cant be done like this

Answers (2)

David Hill
David Hill on 11 Jan 2021
syms a b c d;
t=[a b;c d];
coef=[2 3];
eqn=dot(coef,t(1,:));

Walter Roberson
Walter Roberson on 11 Jan 2021
t = sym('t%d_%d',[15,15]);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!