Re: Please Help, New to Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg37682] Re: Please Help, New to Mathematica
- From: bghiggins at ucdavis.edu (Brian Higgins)
- Date: Fri, 8 Nov 2002 02:15:53 -0500 (EST)
- References: <aqdjts$t5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Adrian, Will this meet your needs: pulseTrain[z_,p_]:= Module[{g},g[x_,y_]:=1/;0<=x<=y; g[x_,y_]:=0/;y<x<=2 y; g[Mod[z,2 p],p]] In[81]:=Plot[Evaluate[pulseTrain[x, If[x < -5, 0.7, 2]]], {x, -20, 40}, PlotPoints -> 100] Cheers, Brian "Adrian M. Peter" <ama_uf at bellsouth.net> wrote in message news:<aqdjts$t5$1 at smc.vnet.net>... > Hi, > > I am a newbie to mathematica. Can any tell me how I can create a train > of rectangular pulses? I then need to modulate each pulse at a > different frequency. Thank you in advance for the help. > > Adrian > > ------------------------------------------------------------------- > / / / ____/ > / / / / > / / / ____/ > /__/ / / > _______/ __/ > -------------------------------------------------------------------