Help in solving an integral using MATLAB
Afficher commentaires plus anciens
[EDIT: Thu Jun 23 15:48:04 UTC 2011 - Clarify - MKF]
This is the integral that I'm trying to solve.
clear
clc
syms x y;
f = input('Write function = ');
F = inline (char(f));
a = input ('from (x): ');
b = input ('to (x) : ');
a1 = input ('from (y) : ');
b1 = input ('to (y) : ');
F = int (int(f,x,a,b),y,a1,b1);
the function is:
(1/((3.11e-6)-((2.25e-6)*(((1-((x^2)/(1e-8)))^2)*((1-((y^2)/(1e-8)))^2)*(1+((1.1e-8)*(x^2))+((1.1e-8)*(y^2)))))))
and must be evaluate in x: from -1e-4 to 1e-4 and in y from -1e-4 to 1e-4
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 23 Juin 2011
1 vote
int() applies to symbolic expressions, not to inline functions.
That said: the function is difficult (perhaps impossible) to integrate symbolically, but numeric integration should be fast. Consider using one of the quad* integrators.
Catégories
En savoir plus sur Function Creation 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!