matlabdoublesymbolic-mathcell-arraysym

Convert Cell Array of Symbolic Functions to Double Array of Symbolic Functions MATLAB


I have the following:

syms x;
F = {3*x,2*x,x};

I would like to make F the following array G:

G = [3*x,2*x,x];

To do this, I have tried this:

G = double(F);

and this:

 G = double([F{:}]).';

Neither options work. Is there a way to do this in MATLAB?


Solution

  • The correct answer is G=[F{:}]