How do i plot CDF (probability) in Matlab?

 Respuesta aceptada

Star Strider
Star Strider el 29 de Dic. de 2014
Editada: Star Strider el 30 de Dic. de 2014
This is how I would do it:
F = @(x,y) [1*(x>=1 & y>=1) + x.*((x>=0 & x<1) & (y>=1)) + y.*((x>=1) & (y>=0 & y<1)) + x.*y.*((x>=0 & x<1) & (0<=y & y<1))];
[X,Y] = meshgrid(linspace(-1, 3, 50));
FXY = F(X,Y);
figure(1)
surfc(X, Y, FXY)
grid on
xlabel('X')
ylabel('Y')
zlabel('F(X,Y)')
view([130 40])
producing this plot:

4 comentarios

Youssef  Khmou
Youssef Khmou el 30 de Dic. de 2014
vote for this answer.
Star Strider
Star Strider el 30 de Dic. de 2014
Thank you, Youssef!
chen
chen el 30 de Dic. de 2014
thank you very much Strider
Star Strider
Star Strider el 30 de Dic. de 2014
My pleasure!
The most sincere expression of thanks here on MATLAB Answers is to Accept the Answer that most closely solves your problem.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 29 de Dic. de 2014

Comentada:

el 30 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by