View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Trim array

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 1 Download (last 30 days) File Size: 2.01 KB File ID: #42056 Version: 1.0
image thumbnail

Trim array

by

 

Remove columns and rows that are empty or that contain only NaN's in the input arrays

| Watch this File

File Information
Description

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.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us