how should I plot the y(n)

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 ExchangeMATLAB についてさらに検索

タグ

質問済み:

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