Error in nested integration
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Shweta Rajoria
le 22 Nov 2017
Commenté : Shweta Rajoria
le 24 Nov 2017
I want to integrate a function and program is given below:
close all;
clear all;
fun = @(x,y)x+(x./(y.^2));
fun1= @(y) y+ integral(@(x)fun(x,y), 0,1);
c1= integral(fun1,0,1)
In the above program if we are using 'y' instead of 'y.^2', then there is no error. But if we are using 'y.^2' error occurred matrix dimension must agree. But here we are using x, y as variable hence there should be no question of matrix dimension. If, anybody can solve the problem please help me . Any suggestions regarding this will be appreciated.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Numerical Integration and Differentiation 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!