definite integral in matlab

조회 수: 3 (최근 30일)
SOHRAB ALAM
SOHRAB ALAM 2012년 3월 18일
답변: Moses 2023년 11월 1일
I want definite integral of equations c2 and pout as-:
z = ((1/gamma(m))*((m/T).^m))*(1/log10(2))
f = (y.^(m-1))*(log10(1+y))*(exp((-m*y)/T))
c2=z*int(f,0,2);
pout=((1/gamma(m))*((m/T).^m))*int(f,0,yth);%outage probability
and please give me help for definite integral in matlab theoretically also if possible.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 3월 18일
We need to know which variable you wish to integrate f over.

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

답변 (3개)

Dev-iL
Dev-iL 2012년 3월 18일
Hello,
Generally, if you want to calculate some integral analytically, you can use symbolic math. Here's an example:
syms x y
z=2*x+y+4;
If you want to know the antiderivative use:
Z=int(z,x)
Z =
(2*x + y + 4)^2/4
Then you can evaluate this function at the limits using:
subs(Z,x,<value to put instead of 'x'>)
or if you want to just get the result without going through the antiderivative, simply use:
Z=int(z,x,<lower bound>,<upper bound>)
Alternatively, if you want to calculate the integral numerically, you can use the MATLAB function quad (you can read about it in the MATLAB help files).
.
I hope this helps you,
Iliya.

Walter Roberson
Walter Roberson 2012년 3월 18일
If your variable of integration is y, and m and T are to remain symbolic (no definite value given for them before the integration), then you will have trouble finding an analytic integral. You effectively have a y^m term as part of f, and the integral of that part can look very different depending on m (especially m=0 or m=-1)
There is a transform you can do (in Maple at least) that converts the integral into an infinite sum. Not that it does you much good as you end up having to evaluate the infinite sum numerically. And the transform turns out not to be valid if m is integral.
Matters become much easier if you are given m before you do the integration.
If your m are strictly positive integer, then you might be able to work out the pattern. I can see that there is a pattern, but the rule for the the coefficients of the polynomials involved are not obvious.

Moses
Moses 2023년 11월 1일
How can I plot the analytical results of outage probability vs SNR

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by