How can I display a distribution of one data set on a graph?

1 visualizzazione (ultimi 30 giorni)
Hello,
I want to calculate a data set's distribution and display it on a graph. For instance, I have a previously computed data set with the length of 280 or longer than that (sometimes smaller). We know that Histogram is able to display how a series of data distribute in a specified range, [0 1], for example.
My question is to calculate the distribution of the data set and display it without using histogram. I completed an example by normalizing the data set at first and then calculate the distribution via hist(data set). And then generate a [0 1] region via linspace, i.e. the region has the same length with the normalized data set. It can be illustrated as below.
E.g. a normalized data set in [0 1]
ds1 = [ 0.523, ..., 0.232, 0.012, ..., 1]
hist_ds1 = hist(ds1);
t = linspace(0,1, length(ds1));
figure; hold on;
plot(t, ds1, 'r')
However, the graph seems not that correct according to experience. Thanks. YAO.

Risposte (0)

Categorie

Scopri di più su Graph and Network Algorithms in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by