Use quadgk with multiple Inputs with Matlab Coder
Afficher commentaires plus anciens
Hi I want to create a C file out of my Matlab file. In my Matab file I have to make some integrations, that is way I am using the quadgk function. My problem is now, that the Matlab Coder for generating the C Code doesn't allow function handels.
I want to integrate the function
function val=integrand1(x,c,d) val=x*c+d; end
by the follwing term
Integral = quadgk('integrand1',z(1),z(2),-1,z(2))
So the intergal goes from z(1) to z(2) and for the parameters c and d I want to use the values -1 and z(2). If I do so the Matlab Coder gives the errow ??? First input argument must be a function handle.
But how can I use quadgk instead? Thank you very much for any help.
Best regards Antonia
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!