ChunkMinMax

版本 1.0.0.0 (13.0 KB) 作者: Jan
Min and Max over chunks of a vector
251.0 次下载
更新时间 2015/1/2

查看许可证

ChunkMinMax - min and max element of sub-vectors
[Mins, Maxs] = ChunkMinMax(X, Start, Stop, Valid)
INPUT:
X: Real double array.
Start, Stop: Vectors of type double.
Valid: If this is the string 'valid', X cannot contain NaNs and the function
runs 10% faster. Optional, default: 'nans'.
OUTPUT:
Mins, Maxs: Minimal and maximal values of the intervals:
Data(Start(i):Stop(i))
NaN is replied for empty intervals.
EXAMPLES:
data = rand(1, 100);
starts = [5 10 15 20]; stops = [9 14 19 24];
[mins, maxs] = ChunkMinMax(data, starts, stops);

The Mex-file is compiled the first time, when this function is called.
You can compile manually also:
mex -O ChunkMinMax.c
See the C-file for further instructions.
Pre-compiled files can be downloaded: http://www.n-simon.de/mex
Run the unit-test uTest_ChunkMinMax after compiling to check validity and speed!

引用格式

Jan (2024). ChunkMinMax (https://www.mathworks.com/matlabcentral/fileexchange/48929-chunkminmax), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Linear Algebra 的更多信息
标签 添加标签

Community Treasure Hunt

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

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