How to pass symbolic variables to funcion handle
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!