How to create a symbolic matrix where each entry is a function of time?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2016 年 6 月 24 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!