Trim array

Remove columns and rows that are empty or that contain only NaN's in the input arrays
261.0 次下载
更新时间 2013/6/3

查看许可证

Remove columns and rows that are empty or that contain only NaN's in the input arrays, in the beginning, in the end, in both extremities or in the entire array

USAGE
[out1,out2,...] = trim_array(action,array1,array2,...)
output = trim_array(action,array1,array2,...)

INPUT
- ACTION: 'beginning', 'end', 'edges', or 'all'
- 'beginning': remove only the first rows and columns
- 'end': remove only the last rows and columns
- 'edges': remove the both the first and last rows and columns
- 'all': remove all rows and columns with NaN or empty elements
- ARRAY : cell or numeric array

OUTPUT
- OUTPUT: If N input arrays are given, with N outputs, each output is the corresponding trimmed array. If one output is given, it is a cell array containing the trimmed arrays in each element.

引用格式

Guilherme Coco Beltramini (2024). Trim array (https://www.mathworks.com/matlabcentral/fileexchange/42056-trim-array), MATLAB Central File Exchange. 检索时间: .

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

Community Treasure Hunt

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

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