squeeze
Remove dimensions of length 1.
📝Syntax
B = squeeze(A)
📥Input Arguments
Parameter Description
A input array: multidimensional array
📤Output Arguments
Parameter Description
B output array.
📄Description

B = squeeze(A) returns an array with the same elements as the input array A, but with dimensions of length 1 removed.

💡Examples
 A = zeros(1, 1, 3);
A(:, :, 1:3) = [1 20 3];
R = squeeze(A)
🔗See Also
reshape
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub