14 visualizaciones (últimos 30 días)
Saad Khan el 1 de Nov. de 2020
Editada: Swetha Polemoni el 4 de Nov. de 2020
I'm having trouble plotting rician pdf.
I have already managed to plot what i think is the empircal density funtction in a histogram.
What i need is a trace red line like this image:
so far i have this:
generated using this code:
u = 2;
s = sqrt(0.5);
% Generate in-phase component
X = normrnd( u, s, [1 randSamples]);
Y = normrnd( u, s, [1 randSamples]);
% Rician RV, S = sqrt( X^2 + Y^2 )
S = sqrt( X .^ 2 + Y .^ 2 );
% empirical probability density
[f,x] = ecdf(S);
ecdfhist(f,x, 20); hold on
How to get the red line?
This is the question for reference:
Thanks.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Swetha Polemoni el 4 de Nov. de 2020
Editada: Swetha Polemoni el 4 de Nov. de 2020
You might want to smoothen the histogram.
Here is the example for understanding smoothening of histogram using "spline" command.
You might consider "ksdensity" for smoothening. Below code snippet is for better understanding.
k=5;
s = [randn(100,1); randn(100,1)+k];
histogram(s,'Normalization','probability')
[f,x] = ksdensity(s);
hold on
plot(x,f)
##### 4 comentariosMostrar 2 comentarios más antiguosOcultar 2 comentarios más antiguos
Saad Khan el 4 de Nov. de 2020
Thank you!
Can you tell me which value corresponds to the K factor of 4 referred to in the question?
Swetha Polemoni el 4 de Nov. de 2020
Editada: Swetha Polemoni el 4 de Nov. de 2020

Iniciar sesión para comentar.

### Categorías

Más información sobre Rician Distribution en Help Center y File Exchange.

### Community Treasure Hunt

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

Start Hunting!

Translated by