From: darren on
I am trying to generate a gaussian pulse of width 1 and amplitude 1, below is the code I have written, however I get an error saying exp not enough arguments.

p = (1/(1 *sqrt(2*pi)))*exp^-{(1-1)^2/(2*1^2)};
t = -1:1/fs:1;
figure (1);plot (p,t)

Am I doing this correctly, or am I way of base.
From: Sadik on
Hi Darren,

Yes, you are way off base. :D

You could start to play with this one instead:

fs = 1000;
t = -1:1/fs:1;
p = (1/(1 *sqrt(2*pi)))*exp(-t.^2/2);
plot(t,p)

Best.
From: darren on
"Sadik " <sadik.hava(a)gmail.com> wrote in message <ho3593$cog$1(a)fred.mathworks.com>...
> Hi Darren,
>
> Yes, you are way off base. :D
>
> You could start to play with this one instead:
>
> fs = 1000;
> t = -1:1/fs:1;
> p = (1/(1 *sqrt(2*pi)))*exp(-t.^2/2);
> plot(t,p)
>
> Best.

Thanks very much for that help, I would have been tring to manipulate that equation for weeks.

I have changed the settings to give me an amplitude of 1, but I am unable to start the curve at 0. Any ideas?
From: Sadik on
You should have t ranging from something to the very left of 0. Something like this:

t = -10:1/fs:10;

If you need, you can change the lower limit of t to get a truncated but still acceptable version.
From: darren on
"Sadik " <sadik.hava(a)gmail.com> wrote in message <ho3a4n$mb7$1(a)fred.mathworks.com>...
> You should have t ranging from something to the very left of 0. Something like this:
>
> t = -10:1/fs:10;
>
> If you need, you can change the lower limit of t to get a truncated but still acceptable version.

Thanks again, I now have another problem, I have to make the signal represent 1010 using bipolar signalling, I have done triangular, rectangular, but I am unable to make the gaussian signal follow the pos neg pos neg bipolar signal.

Any ideas?