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

1 次查看(过去 30 天)
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

回答(2 个)

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

Walter Roberson
Walter Roberson 2021-1-11
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!

Translated by