How to pass symbolic variables to funcion handle
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!