![]() |
如何在Matlab中显示我的100x1矢量数据的经验pdf?
我有一个100x1向量的数据。如何在Matlab中显示其经验pdf?另外,如果我想在同一张图上比较三个向量的pdf,那么该怎么做?
现在,我正在使用[URL="http://www.mathworks.com/matlabcentral/fileexchange/8578-pdfplot"]pdfplot.m[/URL]文件来绘制我的经验pdf,但是,当我想使用“保持”来比较3个分布时,首先它不起作用,其次所有颜色都使用相同的颜色。谢谢! [B]编辑:[/B]我不想绘制CDF。 [B]回答:[/B] [URL="http://www.mathworks.com/help/techdoc/ref/hist.html"]历史[/URL] : hist(data) 或者,如果您想更好地控制其呈现方式,请使用: [n,x] = hist(data); plot(x,n,'rx-'); %# just an example, plot the pdf with red x's and a line, %# instead of bars figure; plot(x, cumsum(n)/sum(n)); %# plot the CDF [url=https://stackoverflow.com/questions/3824724]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 01:23。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.