how should I plot the y(n)

1 vue (au cours des 30 derniers jours)
pengzhan wei
pengzhan wei le 5 Mai 2020
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

Réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 5 Mai 2020
Modifié(e) : KALYAN ACHARJYA le 5 Mai 2020
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 commentaire
Rik
Rik le 5 Mai 2020
Since this is related to a previous post, I happen to know this is a homework assignment which requires a cdfplot.

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by