subs function handle not working with arrayfun

subbed_cell_out = arrayfun(@subs,sym_fun_cell,'uniformoutput',false); % No change to sym_fun_cell
I have a cell array of matrices containing symbolic functions (ie. sym_fun_cell).
The symbolic functions themselves are functions of 'x' and 'x_r'. So I want to sub for x_r and x which already have values assigned within the workspace.
An example of an element of sym_fun_cell is:
[ 0.05*(13.0*x^3 - 10.0*x^2 + 1.0)^2, 0.05*(3.4*x^3 - 3.7*x^2 + x)*(13.0*x^3 - 10.0*x^2 + 1.0), 0.05*(- 13.0*x^3 + 10.0*x^2)*(13.0*x^3 - 10.0*x^2 + 1.0), -0.05*(- 3.4*x^3 + 1.9*x^2)*(13.0*x^3 - 10.0*x^2 + 1.0)]
[ 0.05*(3.4*x^3 - 3.7*x^2 + x)*(13.0*x^3 - 10.0*x^2 + 1.0), 0.05*(3.4*x^3 - 3.7*x^2 + x)^2, 0.05*(- 13.0*x^3 + 10.0*x^2)*(3.4*x^3 - 3.7*x^2 + x), -0.05*(- 3.4*x^3 + 1.9*x^2)*(3.4*x^3 - 3.7*x^2 + x)]
[ 0.05*(- 13.0*x^3 + 10.0*x^2)*(13.0*x^3 - 10.0*x^2 + 1.0), 0.05*(- 13.0*x^3 + 10.0*x^2)*(3.4*x^3 - 3.7*x^2 + x), 0.05*(- 13.0*x^3 + 10.0*x^2)^2, -0.05*(- 13.0*x^3 + 10.0*x^2)*(- 3.4*x^3 + 1.9*x^2)]
[ -0.05*(- 3.4*x^3 + 1.9*x^2)*(13.0*x^3 - 10.0*x^2 + 1.0), -0.05*(- 3.4*x^3 + 1.9*x^2)*(3.4*x^3 - 3.7*x^2 + x), -0.05*(- 13.0*x^3 + 10.0*x^2)*(- 3.4*x^3 + 1.9*x^2), 0.05*(- 3.4*x^3 + 1.9*x^2)^2]
Thanks

回答(0 个)

类别

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by