How do i plot CDF (probability) in Matlab?

2 ビュー (過去 30 日間)
chen
chen 2014 年 12 月 29 日
コメント済み: Star Strider 2014 年 12 月 30 日
i have the following CDF (attached)
How can i plot it ? how do i set the domain?
Thanks

採用された回答

Star Strider
Star Strider 2014 年 12 月 29 日
編集済み: Star Strider 2014 年 12 月 30 日
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 件のコメント
chen
chen 2014 年 12 月 30 日
thank you very much Strider
Star Strider
Star Strider 2014 年 12 月 30 日
My pleasure!
The most sincere expression of thanks here on MATLAB Answers is to Accept the Answer that most closely solves your problem.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by