Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский

Please note that the recommended version of Scilab is 6.0.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > Matrix manipulation > squeeze

squeeze

removes singleton dimensions of a hypermatrix

Calling Sequence

hypOut = squeeze(hypIn)

Arguments

hypIn

a hypermatrix or matrix of constant type.

hypOut

a hypermatrix or matrix of constant type.

Description

The squeeze function removes singleton dimensions of a hypermatrix, that is any dimension for which the size is 1. If the input hypIn is a matrix, it is unaffected.

Examples

M1 = zeros(2,1,5)
squeeze(M1)
squeeze(M1(:,:,1))

M2 = hypermat([2 1 2 1],1:4)
squeeze(M2)

See Also

  • hypermat — initializes an N dimensional matrix
  • hypermatrices — a Scilab object, N dimensional matrix in Scilab
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:34:41 CEST 2012