Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'keeping this variable local' topicStudent Support Forum > General > "keeping this variable local"

Next Comment >Help | Reply To Topic
Author Comment/Response
Beat Tödtli
03/28/01 2:53pm

Hi,
In my function

fourierplot[f_,{x_,min_,max_}]:=Module[{fourier},
fourier=FourierTransform[f,x,k];
Print[''F[k]='',fourier];
Plot[fourier,{k,min,max}]];

I don't manage to keep the variable k local. For,

fourierplot[f_,{x_,min_,max_}]:=Module[{k, fourier},
fourier=FourierTransform[f,x,k];
Print[''F[k]='',fourier];
Plot[fourier,{k,min,max}]];

doesn't work (for example, in
fourierplot[UnitStep[x+1/2] UnitStep[1/2-x],{x,-50,50}]
)

What's the Problem?

URL: ,

Subject (listing for 'keeping this variable local')
Author Date Posted
keeping this variable local Beat Tödtli 03/28/01 2:53pm
Re: keeping this variable local Henry Lamb 03/29/01 3:07pm
Re: keeping this variable local John Leko 03/29/01 3:11pm
Next Comment >Help | Reply To Topic