cancel
Showing results for
Search instead for
Did you mean:
cancel
Showing results for
Search instead for
Did you mean:

## Plot of complex numbers and symbolic engine not working

SOLVED  Garnet

## Plot of complex numbers and symbolic engine not working

Hi all,

I am trying to plot the amplitude spectra( or Fourier transform) of a one cycle sine wave

i.e sin(t)*u(t)-u(t-2*pi), where u(t) represents a Heaviside function.

1-I found the Fourier transform of this using integration. However, when f(t) * e^..... is put in the symbolic arrow does not give any answer and merely states the same. When sin(t)*e^-1i*w*t is integrated the symbolic gives the correct answer but why does it not work when f(t) is used.

2-Second problem, I want to plot this fairly simple function. The problem is mathcad is saying the real part is around 0.075 according to the graph. It should be 0,0. The imaginary part should be 0,-3.141... however mathcad is plotting 1,-3.141.... What is going on?

The file is attached. Prime 6 was used

1 ACCEPTED SOLUTION

Accepted Solutions  Ruby III
(in response to AS_9824434)

## Re: Plot of complex numbers and symbolic engine not working

The plot is correct, but the scaling which was automatically chosen by Prime is ... unfavorable, to keep it polite.

If you look closely you see that the point is right between -0.15 and +0.15, so its correctly at zero. The short vertical line you see from the point to the x.axis is drawn, because you had chosen a "Stem plot" as plot type for the real part instead of a normal "Line Trace".

Because of the scale chosen by Prime the axis in your plot don't cross at (0,0) even though the appropriate button is pressed. You can move the axis with the mouse, but it will only snap to an axis tick.
You have to manually change the scaling - its not obvious but you can edit the first, second and last value at each axis (the values highlighted in yellow in the picture below).
Primes plotting abilities are far away from being state of the art and the 3D-plots are even worse.

BTW, you may consider making w an additional argument of function f and use F(1) instead of defining w:=1 for the whole rest of the sheet. 7 REPLIES 7  Ruby III
(in response to AS_9824434)

## Re: Plot of complex numbers and symbolic engine not working

Delete the definition of w:=1 at the top of the sheet and see if things are working as you expect.

BTW, you can use an omega instead of just w by typing w followed by Ctrl-g  Garnet
(in response to Werner_E)

## Re: Plot of complex numbers and symbolic engine not working

Hi,

I tried that but it doesn't work. It does give the correct symbolic result but now the graph is wrong. And when I do w:1 , the previously mentioned problem occurs.  Ruby III
(in response to AS_9824434)

## Re: Plot of complex numbers and symbolic engine not working

When the symbolic result is correct, why do you think that the graph is wrong?

The real part is constant zero and the imaginary part is the hyperbola -pi/w

F(1)=0-3.14 *j  Garnet
(in response to Werner_E)

## Re: Plot of complex numbers and symbolic engine not working

Oh no, that graph is correct. What I meant to say is that that when I make w=1 to plot F(1), I don't think it is plotting the correct result. Instead, it plots something like F(1)= (1,-3.14) and (1,0.075). I have no idea what the latter part is. Where is the real part coming from?

I think F(1) is correct because w is 1 so w axis value would be one. I dunno what the Re(F(1)) is?  Ruby III
(in response to AS_9824434)

## Re: Plot of complex numbers and symbolic engine not working

The plot is correct, but the scaling which was automatically chosen by Prime is ... unfavorable, to keep it polite.

If you look closely you see that the point is right between -0.15 and +0.15, so its correctly at zero. The short vertical line you see from the point to the x.axis is drawn, because you had chosen a "Stem plot" as plot type for the real part instead of a normal "Line Trace".

Because of the scale chosen by Prime the axis in your plot don't cross at (0,0) even though the appropriate button is pressed. You can move the axis with the mouse, but it will only snap to an axis tick.
You have to manually change the scaling - its not obvious but you can edit the first, second and last value at each axis (the values highlighted in yellow in the picture below).
Primes plotting abilities are far away from being state of the art and the 3D-plots are even worse.

BTW, you may consider making w an additional argument of function f and use F(1) instead of defining w:=1 for the whole rest of the sheet.   Garnet
(in response to Werner_E)

## Re: Plot of complex numbers and symbolic engine not working

Thanks again, I don't understand why I didn't see that before. The real part was zero all along! I've changed the y axis now and its all sorted.

The stem trace is normally used by my lecturer when harmonics or amplitude spectra is plotted but I might start using the line trace.

I was working late at night yesterday so, might have missed it.  Anyway, the time displayed in these forums is very different to where I live. My time is 4 hours ahead of this forums time.  Ruby III
(in response to AS_9824434)

## Re: Plot of complex numbers and symbolic engine not working

For plotting a spectra a stem plot sure is appropriate.

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."