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
Post a Comment