Error in series summation

조회 수: 10 (최근 30일)
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 1월 26일
댓글: REEMA MOHANTY 2020년 11월 14일
I am trying to do a summation of a series as shown below:
syms x n S lf Wf jmpp Rb Wb
Iline=4*jmpp*S*lf/Wf;
I1=(n-1)*Iline*Wf+Iline*x;
I2=n*Iline*Wf;
dR=Rb/Wb;
P1=int(I1^2*dR,0,Wf);
P2=I2^2*dR*S;
Pt=P1+P2;
pb=symsum(Pt,n,1,4);
The summation works fine if I do it for:
pb=symsum(Pt,n,1,6);
or
pb=symsum(Pt,n,1,10);
but for some reason not for 4 and 5!! Do you know why is that?
  댓글 수: 2
Matt J
Matt J 2013년 1월 26일
Elaborate on "nor for 4 and 5". What do you see and what do you think you should see?
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 1월 26일
Matt I have elaborated it. Can you see the results? It is strange...

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

답변 (2개)

Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 1월 26일
If I do it for
pb=symsum(Pt,n,1,n);
I get the result:
pb=(8*(2*Rb*S^3*jmpp^2*lf^2*n^3 + 3*Rb*S^3*jmpp^2*lf^2*n^2 + Rb*S^3*jmpp^2*lf^2*n + 2*Rb*Wf*S^2*jmpp^2*lf^2*n^3))/(3*Wb);
I set:
n=4;
I get:
pb =
(1440*Rb*S^3*jmpp^2*lf^2 + 1024*Rb*Wf*S^2*jmpp^2*lf^2)/(3*Wb)
Then I would like to confirm the result by doing the calculations for n=1 until n=4 as shown below:
Pa1=int((Iline*x)^2*dR,0,Wf);
Pa2=(Iline*Wf)^2*dR*S;
Pb1=int((Iline*Wf+Iline*x)^2*dR,0,Wf);
Pb2=(2*Iline*Wf)^2*dR*S;
Pc1=int((2*Iline*Wf+Iline*x)^2*dR,0,Wf);
Pc2=(3*Iline*Wf)^2*dR*S;
Pd1=int((3*Iline*Wf+Iline*x)^2*dR,0,Wf);
Pd2=(4*Iline*Wf)^2*dR*S;
Pt=Pa1+Pa2+Pb1+Pb2+Pc1+Pc2+Pd1+Pd2;
Then I take the fraction
pb/Pt
and I get 1. In this way review that the series is working fine.
But for some reason when I am asking from matlab to do the summation from 1 until 4. I get the following error.
Error using mupadmex
Error in MuPAD command: The number of arguments is incorrect. [has]
Evaluating: sum
Error in sym/symsum (line 65)
rSym = mupadmex('symobj::map',f.s,'symobj::symsum',x.s,a.s,b.s);
Error in sumseries (line 17)
pb=symsum(Pt,n,1,4);

Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 1월 27일
I have tried the matlab script above in other pc's without a problem. I cannot understand why is this happening.
  댓글 수: 1
REEMA MOHANTY
REEMA MOHANTY 2020년 11월 14일
Even I am getting the same result .
Could anyone suggest something?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by