find_idx

版本 1.1.0.2 (4.3 KB) 作者: Bruno Luong
Fractional binning
2.1K 次下载
更新时间 2021/6/9

查看许可证

idx=find_idx(xi, xgrid)
This function not only bin similarly to HISTC, but also returns the fractional position of data points within the binning interval.
It is equivalent to
interp1(xgrid,(1:length(xgrid)), xi)
but with the speed improvement up to 5 times.
Algorithm: dichotomy, complexity of m.log(n), where m isnumber of data points (xi) and n is number of bins (xgrid).
Few obvious examples of applications:
- binning step for more sophisticated interpolation schemes such as multi-dimensional spline or linear tensorial interpolations.
- Generate discrete random sequences with given probability distribution.

引用格式

Bruno Luong (2024). find_idx (https://www.mathworks.com/matlabcentral/fileexchange/23049-find_idx), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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

Remove mex file as request by TMW

1.1.0.0

Correct tags

1.0.0.0