how to plot empirical cdf in matlab release 2013a
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
mohamed Faraj
il 10 Set 2019
Risposto: Star Strider
il 10 Set 2019
I have matlab release 2013a but the ecdf command is not available for this release. Is there an alternative solution to plot the empirical cdf in release 2013a?.
0 Commenti
Risposta accettata
Star Strider
il 10 Set 2019
One approach:
x = randn(100,1); % Create Data
binrng = linspace(-5, 5, 26); % Choose Bin Centres
hx = histc(x, binrng); % Histogram Counts
chx = cumsum(hx)/numel(x); % Cumulative Sum
figure
plot(binrng, chx)
grid
In histc, the bin ranges are the bin centres. It calculates the bin edges from them.
Experiment to get the result you want.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!