Bound Values of an array

版本 1.0.0.0 (2.1 KB) 作者: Pramit Biswas
Check whether value of the array within specified range or not and change accordingly
7.1K 次下载
更新时间 2013/8/29

查看许可证

Check whether value of the array within specified range or not, if in range it stays there as it is and if not then substitute by boundary value (depending upon which it breaks, if higher boundary breaks then replaced by higher boundary value and vice-versa)

function [ A2comp ] = MinMaxCheck( minimum, maximum, A2comp )
A2comp is the array to check
minimum and maximum are arrays which holds the minimum and maximum value of each element of an array (A2comp) respectively
output returns the array where all values within the range
if element of A2comp is less than minimum boundary value then it's changed to minimum boundary value
if element of A2comp is greater than maximum boundary value then it's changed to maximum boundary value
all array must be same in length

引用格式

Pramit Biswas (2024). Bound Values of an array (https://www.mathworks.com/matlabcentral/fileexchange/43251-bound-values-of-an-array), MATLAB Central File Exchange. 检索时间: .

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

启发作品: BoundNDArray(array,lb,ub)

Community Treasure Hunt

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

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