| Hi, I wish to draw a histogram of two data, one with length of 60 and
| the other with length of 1000, and in the way that readers can see the
| difference in black and white. How can I do this ? thank you.
See if the following helps:
I assume that you want to show the sample probability density functions, use
% Make data sets of different lengths.
% Let Matlab find the bin positions that include both data sets.
[dummy, t] = hist([x;y], 20);
nx = hist(x, t); % Sort x into bins.
nx = transpose(nx/sum(nx));
ny = hist(y, t); % Sort y into bins.
ny = transpose(ny/sum(ny));
% Plot bin counts as bars.
bar(t, [nx, ny])
If you just want to show the actual (unnormalized) distributions, use the
same code, but don't divide by sum(nx) and sum(ny).
Quote:> Hi, I wish to draw a histogram of two data, one with length of 60 and
> the other with length of 1000, and in the way that readers can see the
> difference in black and white. How can I do this ? thank you.
> Hi autumn,
> See if the following helps:
I do not understand this message. Who are you replying to? What are Y(:,1)
> > Hi autumn,
> > See if the following helps:
> > Jeff
You'll receive the error on the last line:
??? Error using ==> vertcat
All rows in the bracketed expression must have the same
number of columns.
_Cell_ arrays will allow you to do this, but many operations (the basic
linear algebra operations, for example) aren't defined for cell arrays. You
may want to pad your arrays to fit them into the same matrix, like:
We have developed a code to define degree of similarity between
unequal-sized time sequences. Can anybody suggest possible applications for
For example, comparing musical scores with unequal rate
Thanks for the feedback.