How can I plot the realizations of a Gaussian signal?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
litt.cuss
am 19 Mär. 2019
Verschoben: Adam Danz
am 16 Feb. 2023
I would like to plot the realizations of a simple Gaussian signal with mean 0 and unit variance. Let's call it X(t).
If I use the function randn(), I get a vector of gaussian variables, that is for every ω I get a random variable
. But what I want is a function of time, that is, fixed ω, I want to see X
(t) on my plot.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209221/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209222/image.png)
How can I get that?
5 Kommentare
navid seif
am 16 Feb. 2023
Verschoben: Adam Danz
am 16 Feb. 2023
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1297560/image.png)
If s(t) is a guassian signal, then the jth column of Ψi corresponds to πj that πj is a 3D vector [xj; yj; zj] shown above:
How can I implement this formula in MATLAB?
Akzeptierte Antwort
Adam Danz
am 19 Mär. 2019
Bearbeitet: Adam Danz
am 14 Jul. 2020
"I would like to plot the realizations of a simple Gaussian signal with mean 0 and unit variance. Let's call it X(t)."
The parameterized equation for a gaussian is below where
- 'a' specifies the amplitude
- 'b' specifies the x-coordinate of the center
- 'c' specifies the width
- 'x' is a vector of x inputs
gauss = @(x,a,b,c) a*exp(-(((x-b).^2)/(2*c.^2)));
% demo
x = -4:.01:4;
amp = 1;
cnt = 0;
sig = 1;
y = gauss(x, amp, cnt, sig); %same as y = gaussmf(x, [sig, cnt]) * amp;
figure
plot(x,y)
hold on
plot([cnt,cnt], ylim, ':k') %show center
xlabel('time(ms)')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209229/image.jpeg)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!