rhist

Computes and plots relative frequency and relative frequency density.
3.9K 次下载
更新时间 2005/6/22

查看许可证

rhist is extension of MATLAB hist function to compute and plot relative frequency and density.

N = HIST(Y) bins the elements of Y into 10 equally spaced containers and returns the relative frequency of elements in each container. If Y is a
matrix, RHIST works down the columns.

N = RHIST(Y,M), where M is a scalar, uses M bins.

N = RHIST(Y,X), where X is a vector, returns the relative freqency of Y among bins with centers specified by X. The first bin includes data between -inf and the first center and the last bin includes data between the last bin and inf.

N = RHIST(Y,M,Any_Character) returns relative frequency density of Y among bins.Any_Character is the any character inside single quotation or any numeric value. You can omit second optional argument using single quotation i.e. N = RHIST(Y,'',Any_Character) returns relative frequency density for 10 bins.

It is to be noted that sum(N)equals unity for relative frequency while area under curve for relative frequency density equals unity. Note that as size(Y,1) and M increases relative frequency density is close to probability density for continous random variable.

[N,X] = RHIST(...) also returns the position of the bin centers in X.

RHIST(...) without output arguments produces a histogram of relative frequency or relative frequency densisty.

引用格式

Durga Lal Shrestha (2024). rhist (https://www.mathworks.com/matlabcentral/fileexchange/7880-rhist), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 View and Analyze Simulation Results 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0