MATLAB: Converting an array of n symbolic variables to a cell array with n elements

cell arraysdata conversionsymbolic arrays

Hi
Could somebody tell me a way to convert the symbolic array [ x, y , z ] to the 3 element cell array Cell, where Cell{1} = x, Cell{2} = y, etc? You would think it should be possible to do this with mat2cell, but this converts [ x, y, z ] to the a single element cell variable, i.e., Y = cell2mat([x,y,z]) returns T{1} = [ x,y,z].
Thanks!

Best Answer

num2cell() rather than mat2cell()