Error calling 'int'. This call-site passes more inputs to this function than it can accept.
40 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to make a user defined function for integration. It gives an error Error calling 'int'. This call-site passes more inputs to this function than it can accept.
My code is:
function y = fcn(u,a,b)
%#codegen
y=int(u,a,b)
end
where a = t-0.1 ;
b=t
t is input from clock
Please help how to resolve this.
4 commentaires
Walter Roberson
le 28 Oct 2018
Are you sure you want to do symbolic integration?
What I suspect is that you want to use trapz()
Réponses (1)
madhan ravi
le 28 Oct 2018
Modifié(e) : madhan ravi
le 28 Oct 2018
what happens when you do this :
y = integral ( @(t) u,a,b )
3 commentaires
madhan ravi
le 28 Oct 2018
or
function y = fcn(u)
a = t-0.1;
b = t;
%#codegen
y=int(u,a,b)
end
Voir également
Catégories
En savoir plus sur Integrate C/C++ Code Using C Function Blocks 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!