How can I display a distribution of one data set on a graph?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!