Integral a function handle of two variables with respect to a variable
22 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jingyu Liu
le 2 Déc 2021
Commenté : Jingyu Liu
le 2 Déc 2021
f = @(x, y) x+y;
g = @(x) integral(@(y) f(x,y),0,1)
t = (0:0.1:1);
g(t)
It is wrong! How can I get the expected result?
0 commentaires
Réponse acceptée
Walter Roberson
le 2 Déc 2021
f = @(x, y) x+y;
g = @(x) integral(@(y) f(x,y), 0, 1, 'arrayvalued', true)
t = (0:0.1:1);
g(t)
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!