definite integral in matlab
조회 수: 6 (최근 30일)
이전 댓글 표시
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
답변 (3개)
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.
댓글 수: 0
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!