How to create a symbolic matrix where each entry is a function of time?
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 24 Jun 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 Comments
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!