How can i use a cell array in the symbolic variables?
조회 수: 2 (최근 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!