How can i use a cell array in the symbolic variables?
1 回表示 (過去 30 日間)
古いコメントを表示
How can i use a cell array in the symbolic variables?
I have some variables in a matrix (for example [B]).
I want to put the [B] in a cell array.
Is it possible?
3 件のコメント
採用された回答
madhan ravi
2019 年 8 月 22 日
編集済み: madhan ravi
2019 年 8 月 22 日
Wanted = num2cell(symvar(B))
edit: After your comment.
>> syms a b c d x y z
>> A = [ a*(x^2) , b*(y^3) ; d*(x^2)*y , c ]
A =
[ a*x^2, b*y^3]
[ d*x^2*y, c]
>> B = repelem({A},3,1)
B =
3×1 cell array
{2×2 sym}
{2×2 sym}
{2×2 sym}
>>
2 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Variables, Expressions, Functions, and Preferences についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!