How to integrate the Rice distribution and build a graph?

3 visualizaciones (últimos 30 días)
Suleyman Aliyev
Suleyman Aliyev el 21 de Mzo. de 2024
Comentada: Suleyman Aliyev el 29 de Mzo. de 2024
Hello. I need to integrate the Rice distribution to calculate the probability of optical signal error with mathematical expectation v=1, variance s=0.033. There should be a double integration of the Rice distribution, where the inner integral is from 0.9 to infinity, and the outer integral is from 0 to infinity.
Please help me write the working code for calculating and plotting. I've been trying to write for 3 weeks, nothing works, every time there's some kind of mistake, probably due to the fact that I have little experience on matlab.
  3 comentarios
Suleyman Aliyev
Suleyman Aliyev el 25 de Mzo. de 2024
Oh, sorry, I forgot to add a graph for an example:

Iniciar sesión para comentar.

Respuestas (1)

Torsten
Torsten el 25 de Mzo. de 2024
Editada: Torsten el 25 de Mzo. de 2024
As written, H is an integration variable - you cannot prescribe a value for it since it runs from 0 to Inf.
v = 1;
sigma = 0.033;
H = 0.9;
p = @(y)sqrt(y/v).*1/(sqrt(2*pi)*sigma).*exp(-(y-v).^2/(2*sigma^2));
I = integral2(@(H,x)p(x).*p(H),0,Inf,@(H)H,Inf)
I = 0.4999
  3 comentarios
Torsten
Torsten el 25 de Mzo. de 2024
v = 1;
sigma = 0.033;
p = @(y)sqrt(y/v).*1/(sqrt(2*pi)*sigma).*exp(-(y-v).^2/(2*sigma^2));
y = 0.9:0.001:1.1;
plot(y,p(y))
Suleyman Aliyev
Suleyman Aliyev el 29 de Mzo. de 2024
Thank you very much, you helped me a lot!

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by