How to pass symbolic variables to funcion handle

1 次查看(过去 30 天)
I have some function handle in console defined like this:
g=@(t1,t2,t3)[t1^2,t2^3,t3^3];
Then, I have some function like this:
function [] = somefunction(g)
s = sym('s',[1,nargin(g)])
g(s)
This gives an error, because the vector t is viewed as only one element and therefore the error
Not enough input arguments.
appears. How con I fix this?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by