## 4 Reputation

18 years, 361 days

## Perfect!!!...

Thanks so much for the input. Once I figured out how your code worked I am very happy. I must say that was very good thinking in using "op" command to get the desired information out of Dirac function form. thanks again! Anthony

## Perfect!!!...

Thanks so much for the input. Once I figured out how your code worked I am very happy. I must say that was very good thinking in using "op" command to get the desired information out of Dirac function form. thanks again! Anthony

## Dirac Function...

By definition that all makes sense. Thank you for your input. However this is an example of what I am doing. I am creating an AM signal by creating two sinusoids and multiplying them by each other. Try the following program: > Am := 1; > ka := 0.8; > fm := 4e3; > Ac := 10; > fc := 1500e3; > phi:= 0; > m(t) := Am*cos(2*Pi*fm*t); > c(t) := Ac*cos(2*Pi*fc*t + phi); > s(t) := (1+ka*m(t))*c(t); > plot([s(t),0], t=0..3000/(fc), title="AM Waveform (fm = 4kHz)", titlefont=[HELVETICA,16], font=[HELVETICA,12], labels=["Time (s)", "Amplitude"], labeldirections=[HORIZONTAL,VERTICAL], color=[red,black], axes=framed, numpoints=500); > s(f) := fourier(s(t),t,f); I would like to see a plot of the AM signal and then a plot of the frequency components... however after taking the fourier transform of the expression I obtain a linear combination of translated dirac functions. As you pointed out they have the height of infinity (which totally makes sense as my prof. pointed this out). So what can be done with the fourier transform to get a plot that I would like? thanks

## Dirac Function...

By definition that all makes sense. Thank you for your input. However this is an example of what I am doing. I am creating an AM signal by creating two sinusoids and multiplying them by each other. Try the following program: > Am := 1; > ka := 0.8; > fm := 4e3; > Ac := 10; > fc := 1500e3; > phi:= 0; > m(t) := Am*cos(2*Pi*fm*t); > c(t) := Ac*cos(2*Pi*fc*t + phi); > s(t) := (1+ka*m(t))*c(t); > plot([s(t),0], t=0..3000/(fc), title="AM Waveform (fm = 4kHz)", titlefont=[HELVETICA,16], font=[HELVETICA,12], labels=["Time (s)", "Amplitude"], labeldirections=[HORIZONTAL,VERTICAL], color=[red,black], axes=framed, numpoints=500); > s(f) := fourier(s(t),t,f); I would like to see a plot of the AM signal and then a plot of the frequency components... however after taking the fourier transform of the expression I obtain a linear combination of translated dirac functions. As you pointed out they have the height of infinity (which totally makes sense as my prof. pointed this out). So what can be done with the fourier transform to get a plot that I would like? thanks

## RE: Plotting Heaviside Functions...

Thanks for your quick reply. The Dirac function is also known as the unit impulse function. What I would expect to see on the plot is a vertical line of height 1 at specified times. ex: a:=inttrans[fourier](cos(x),x,f)*(1/Pi); a := (Dirac(f + 1) - Dirac(f - 1)) plot(a,s=-2..2); I would expect to see a plot of vertical lines at -1 and 1 of height 1. When you plot the integral you get the heavide function, which is a function over time. However the Dirac function is always zero except at one instant... I think this might be the source of the problem. Although when the heaviside function is plotted the vertical lines show up from when it changes levels...A little frustrating. Any thoughts? thanks

## RE: Plotting Heaviside Functions...

Thanks for your quick reply. The Dirac function is also known as the unit impulse function. What I would expect to see on the plot is a vertical line of height 1 at specified times. ex: a:=inttrans[fourier](cos(x),x,f)*(1/Pi); a := (Dirac(f + 1) - Dirac(f - 1)) plot(a,s=-2..2); I would expect to see a plot of vertical lines at -1 and 1 of height 1. When you plot the integral you get the heavide function, which is a function over time. However the Dirac function is always zero except at one instant... I think this might be the source of the problem. Although when the heaviside function is plotted the vertical lines show up from when it changes levels...A little frustrating. Any thoughts? thanks
 Page 1 of 1
﻿