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

조회 수: 3 (최근 30일)
ZhG
ZhG 2013년 6월 12일
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by