Basic Integration [ Integration limits ]

Hello Guys
Just i am wondering how to solve an integration problem in MATLAB for this equation?? here is the problem below
a= 3.43 int Q*n dr
where n dependent variable on r
Regards

답변 (1개)

Wayne King
Wayne King 2013년 7월 19일
편집: Wayne King 2013년 7월 19일

0 개 추천

Is Q a constant? I'm assuming you mean that n is function of r, like n(r)
Suppose n(r) = r^2 and you want to integrate from [-2,2]
integral(@(r) r.^2,-2,2)
If you don't have a version of MATLAB with integral(), you have options like trapz()
r = -2:0.02:2;
n = r.^2;
trapz(r,n)

댓글 수: 1

sese
sese 2013년 7월 23일
편집: sese 2013년 7월 23일
Q is not constant by the way and the integration is undefined.
Q=a*b; b=X^R; R=10; b=c*r; c=0.801; r=0.1;
BY the way, i have a MATLAB version :) Thank you

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

질문:

2013년 7월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by