How to create a symbolic matrix where each entry is a function of time?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to create a matrix where each entry of the matrix is a function of time. For example, this is what I want the output to look like:
A =
[ A1_1(t), A1_2(t)]
[ A2_1(t), A2_2(t)]
I have tried:
syms t
A = sym('A(t)', [2 2])
but this does not work. Any suggestions?
0 comentarios
Respuestas (1)
Walter Roberson
el 24 de Jun. de 2016
A = sym(zeros(2,2));
for J = 1 : size(A,1)
for K = 1 : size(A,2)
A(J,K) = feval(symengine,sprintf('A%d_%d', J, K), 't');
end
end
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!