MATLAB: How can i use a cell array in the symbolic variables cell arraysymbolic variables 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? Best Answer 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}>> Related SolutionsMATLAB: How Can I put some numbers in a sym and sum its cells syms a b c d B = [ 1 2 ; 3 4] ; x = reshape(B(:,1),1,1,[]); y = reshape(B(:,2),1,1,[]); A = [ a*(x.^2)+y , b*(y.^3)+x ; d*(x.^2).*y , c*y ] ; a = arrayfun(@(z) sum(sum(A(:,:,z))), 1:size(A,3),'un',0);celldisp(a) MATLAB: How can i use Inverse for symbolic variables syms x y a b c dA = [ a*(x^2) , b*(y^3) ; d*(x^2)*y , c ];inv(A)ans =[ c/(- b*d*x^2*y^4 + a*c*x^2), -(b*y^3)/(- b*d*x^2*y^4 + a*c*x^2)][ -(d*y)/(- b*d*y^4 + a*c), a/(- b*d*y^4 + a*c)] Related QuestionHow can i store a number of cell arrays in one cell arrayDelete empty [] {1×7 cell} {1×2 cell}Can we use Xlswrite in symbolic variablesPut number in cellVerifing symbolic equality in MATLABMatlab (2010b) permute does not work for symbolic arraysExtract and realign cells into new cellConverting an array of n symbolic variables to a cell array with n elements
Best Answer