Z=rand(3000,1);
for n=1:3000
x=Z(n);
y(n)=1-exp(-x);
end
how can I plot the y(n)? I tried cdfplot(y(n)),cdf(x,y(n)), but they are not work

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 5월 5일
편집: KALYAN ACHARJYA 2020년 5월 5일

0 개 추천

Z=rand(3000,1);
for n=1:3000
x=Z(n);
y(n)=1-exp(-x);
end
cdfplot(y);
Or (Without Loop: Recomended)
x=rand(3000,1);
y=1-exp(-x);
cdfplot(y);

댓글 수: 1

Rik
Rik 2020년 5월 5일
Since this is related to a previous post, I happen to know this is a homework assignment which requires a cdfplot.

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

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2020년 5월 5일

편집:

2020년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by