How can I plot the realizations of a Gaussian signal?

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.
How can I get that?

댓글 수: 5

What you have tried so far, please show the code?
Can you show in Pictorial representation (diagram), what exactly you are looking for?
I don't have any code because actually I don't know where to start :-(
I thought about a sinusoidal function to show these realizations, or something similar, but my signal is not periodic. Maybe is there another function that can simulate the realizations of the process?
Adam Danz
Adam Danz 2019년 3월 19일
편집: Adam Danz 2019년 3월 20일
I provided an answer that addreses your first sentence but I'm not sure it completely addresses the rest of your question. Let me know if I can be of further help.
Thank you a lot for your help! I was wondering if there is a generic function, something like a test function, to simulate and plot the trajectories of a Gaussian process, when ω is fixed and the process depends only on time. But I think it always depends on the particular kind of process.
Thank you anyway!
navid seif
navid seif 2023년 2월 16일
이동: Adam Danz 2023년 2월 16일
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?

댓글을 달려면 로그인하십시오.

 채택된 답변

Adam Danz
Adam Danz 2019년 3월 19일
편집: Adam Danz 2020년 7월 14일
"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
Note that you could also use gaussmf() if you have the Fuzzy Logic Toolbox.
Also see this answer which includes a vertical offset term and compares the results to gaussmf.
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)')

추가 답변 (0개)

카테고리

질문:

2019년 3월 19일

이동:

2023년 2월 16일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by