plot - How can I display empirical pdf of my 100x1 vector data in Matlab? -


i have data 100x1 vector. how can display empirical pdf in matlab? also, if want compare pdf of 3 vectors on same graph, how that?

right using pdfplot.m file plot empirical pdf, when want compare 3 distributions using 'hold on', firstly not working , secondly distributions in same color. thanks!

edit: don't want plot cdf.

hist:

hist(data) 

or, if want more control on how presented, use:

[n,x] = hist(data); plot(x,n,'rx-'); %# example, plot pdf red x's , line,                   %# instead of bars figure; plot(x, cumsum(n)/sum(n)); %# plot cdf 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -