Matlab integral funtion error
Afficher commentaires plus anciens
Hi, I can't seem to get the integral function to work correctly.
syms x
z=1/(3-1)
f=@(x)(x.*exp((x.^2)-1))/sin(x)
fi=integral(f,1,3)
This is my code, however the integral function keeps giving errors and I am unable to fix the problem. Could someone please help? Thanks in advance!
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 4 Août 2021
1 vote
f=@(x)(x.*exp((x.^2)-1))./sin(x)
Pere Garau Burguera
le 4 Août 2021
The solution is given in the error message, you should use
fi=integral(f,1,3,'ArrayValued',true);
Cheers,
Pere
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!