Histogram transformation
[transformedHistogram,newX]=transformHistogram(originalHistogram,originalX,formula)
transformHistogram transforms the histogram stored in the 1D array 'orignalHistogram' according to the formula 'formula'.
'originalHistogram' is defined at bins stored in 'orignalX'.
The output 'transformedHistogram' contains the transformed histogram at the same bins as the originalHistogram.
The histogram is assumed to be stored according to the following principle:
f(X(i)) = frequency (X(i)<lambda<=X(i+1))
f(X(end) = frequency (lambda=X(end))
This is the principle how histc generates its output.
The best is if f(end)=0
'formula' has to be a string containing the transformation rules. The variable has to be x, e.g. 2x+3
Example: transformHistogram(starved,xscale,'x.^2')
引用
Peter Nagy (2024). Histogram transformation (https://www.mathworks.com/matlabcentral/fileexchange/25015-histogram-transformation), MATLAB Central File Exchange. 取得済み .
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!