Hi guys,

Please help me understand why the output doesn't work as it should . What am I doing wrong ? thanks

Printable View

- Jun 3rd 2009, 01:03 PMnew guyMathematica plotting doesn't work
Hi guys,

Please help me understand why the output doesn't work as it should . What am I doing wrong ? thanks - Jun 3rd 2009, 02:12 PMCaptainBlack
- Jun 3rd 2009, 04:52 PMshawsend
How about taking the sum symmetrically and then plotting the limit superior and limit inferior:

Here's my code to plot (empirically) the limit superior based on the first 100 terms:

Code:`f[t_, kmax_] := 1 + 2*Sum[Cos[2*Pi*k*t],`

{k, 1, kmax}];

ListPlot[Table[{t, Max[Table[f[t, nval],

{nval, 1, 100}]]},

{t, 0, 5, 0.011}]]

- Jun 3rd 2009, 10:57 PMnew guy
Okay thank you both, I understand my mistake now .

I have another question that troubles me , and I'll appreciate your advices.

Given Sum of :with lower limit -N and upper limit +N ,**X_N(t) =Sum [ Exp(j2*Pi*k*t) ]****-2<= t <= 2**

I need to calculate**x(t)**,so I used Euler :

X_N(t) = Sum e^(j2*pi*k*t) = Sum [ cos(2pi*k*t) + j*sin (2pi*k*t) ].

Now ,if I'm mistaken the sinus part becom equal to zero , because the cycle

of sinus is PI . But I have a problem with the Cosinus part , how can I

simplify it ? the "t" parameter interrupts with the simplifying ......

maybe separating it to conditions ? N=2R ------> even , N=2R+1 --> odd ?

thanks in advance - Jun 4th 2009, 04:45 AMCaptainBlack
- Jun 4th 2009, 09:57 PMCaptainBlack
- Jun 5th 2009, 04:12 AMnew guy
thanks for the help .

Something is not clear to me , how did you make your first move with the :

1 + 2*Re(Sigma[....]) ? where did the "1" come from ?

Nonetheless , I need to see how X_N(t) "behaves" with a large "N" , and

assuming (with your solution) N---->infinity , the x(t) would be what exactly ?

X_n(t) = 1 + 2[ 1-cos(2pi*t*(N+1]) ] / 1-cos(2pi*t)

I tried to to something like what you said , using a geometric series . I'd like your opinion with my point of view . thanks again (: - Jun 5th 2009, 04:47 AMCaptainBlack
- Jun 5th 2009, 05:08 AMnew guy
- Jun 5th 2009, 06:15 AMCaptainBlack
Yes it should be from 1 to infinity, I think I have corrected the offending post (but check it)

It is an impropper sum, you only ever consider finite sums and then take the limit as the upper limit goes to infinity (and what you have in that limit is not a normal function as it is zero every where except at integer values of x where it is infinite - in a particulatly odd manner)

CB - Jun 5th 2009, 10:02 AMnew guy
I'm trying to develop the X_N(t) you mentioned above ,into a pulse train of deltas ,something like δ(t-nT) however came up empty handed . After

using Euler and taking the Real part out of XN(t) ,I can't see any way to get to delta pulse train . Are you sure that's the way ? thanks you for all the replies ! - Jun 5th 2009, 11:36 AMCaptainBlack
- Jun 5th 2009, 11:52 AMCaptainBlackCode:
`>`

>.. define function to sum the finite series and plot the result

>

>function FTdelta(n)

$ global I

$ k=[-n:n]';

$ t=-0.5:0.001:0.5;

$ ss=exp(2*pi*I*k*t);

$ SS=sum(ss');

$ color(12);xplot(t,re(SS'));

$ hold on;color(10);plot(t,im(SS'));hold off;color(1);

$ return SS'

$endfunction

>

>.. now look at a plot of the series sum

>

>N=30;

>FTdelta(N);

>xplot;title("k=30");

>

>.. now compute and plot the series sum that we have deduced

>

>t=-0.5:0.001:0.5;

>xx=re(2*(1-exp(2*pi*I*t*(N+1)))/(1-exp(2*pi*I*t)))-1;

>

>

>color(1);xplot(t,re(xx));

>

CB - Jun 5th 2009, 12:14 PMnew guy
Don't get me wrong , I'm greatful for your marvelous help , but you got me

confused this time. First you showed me how to get to

XN(t)=1+2Re*sigma(e^(2pi*jkt)) , and mathematically that's fine of course .But now you're suggesting going back to to Sigma and extract the deltas for there ?

I'll tell you what, I've done a plot of the function with Mathematica and when the "N" is big enough (let us take for example N=200000) I can see

that this is indeed a train of deltas , but I'm very confused about the theoretical point of view . I've tried a few ways however got stucked with them .

As I said before , I'm a beginner in this area and would very much appreciate if you could explain . - Jun 5th 2009, 03:20 PMCaptainBlack
I'm not suggesting anything of the sort, the code and plots showed that the finite series and the sum of that which I gave do indeed give that same result.

Quote:

I'll tell you what, I've done a plot of the function with Mathematica and when the "N" is big enough (let us take for example N=200000) I can see

that this is indeed a train of deltas , but I'm very confused about the theoretical point of view . I've tried a few ways however got stucked with them .

As I said before , I'm a beginner in this area and would very much appreciate if you could explain .

CB