Translating sigma notation / summation / series and integral equation from Microsoft Word into MATLAB syntax and graphing / plotting
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everybody,
I have a little trouble here. I trying to graph/plot the following equation with MATLAB. I already solved the integral of this equation:
f(t)=0.111627907+∑_(n=1)^∞▒〖(1/430 ∫_0^50▒〖((-0.000003072(t-25)^4+1.2) cos(2nπt/860) )dt(nπt/430))〗〗+∑_(n=1)^∞▒〖(1/430 ∫_0^50▒〖((-0.000003072(t-25)^4+1.2 ) sin(2nπt/860) )dt(nπt/430))〗〗
f(t)=0.111627907+∑_(n=1)^∞▒(1/430 1/((π)^4 n^4 ) (-177504/5 (π)^2 n^2+7876917504/125)+1(π)^5 n^5 (-177504/625 (-6450(π)^2 n^2+3816336) sin(5/43 πn)-17750462/5 (125(π)^3 n^3-221880πn) cos(5/43 πn) )(nπt/430)) +∑_(n=1)^∞▒〖(1/430 1/((π)^5 n^5 )(45796032/25 (π)^2 n^2-677414905344/625)+1/((π)^5 n^5 )(-177504/625 (6450(π)^2 n^2-3816336)cos(5/43 πn)-177504/625 (125(π)^3 n^3-221880πn)sin(5/43 πn)(nπt/430))〗
6 件のコメント
回答 (1 件)
Walter Roberson
2019 年 8 月 20 日
syms n t
Q = @(v) sym(v); %convert to rational
Pi = sym('pi');
f1 = Q(0.111627907);
f2a = int((Q(-0.3072*10^(-5))*(t - 25)^4 + Q(1.2))*cos((2*n*Pi*t)/860), t, 0, 50)
f2 = symsum(1/430*f2a*n*Pi*t/430, n, 1, inf)
f3a = int((Q(-0.3072*10^(-5))*(t - 25)^4 + Q(1.2))*sin((2*n*Pi*t)/860), t, 0, 50)
f3 = symsum(1/430*f3a*n*Pi*t/430, n, 1, inf)
f(t) = f1 + f2 + f3;
However, f2 returns NaN. Tracing in a different package, the computation does look suspicious.
4 件のコメント
Walter Roberson
2019 年 8 月 21 日
When I did some investigation, I could see that in at least one way of writing the formulas you could end up with a partial term of -inf*(A-1) for some formula A. Under the circumstances it was probably reasonable to work out that A-1 would be positive, giving you -inf as a result. But if you expand then you get -inf*A -inf*(-1) and that leads you to -inf + inf for positive A and that is NaN. It is not exactly wrong, but it is a limitation on the analysis.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!