Help in solving an integral using MATLAB

[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

 채택된 답변

Matt Fig
Matt Fig 2011년 6월 23일

1 개 추천

f = @(x,y)(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)))))))
dblquad(f,-1e-4,1e-4,-1e-4,1e-4)

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 6월 23일

1 개 추천

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.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2011년 6월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by