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 - 日本語 - Русский
Scilab Help >> Data Structures > hypermatrices


a Scilab object, N dimensional matrix in Scilab


Hypermatrix type allows to manipulate multidimensional arrays.

They can be defined by extension of 2D matrices as follows a=[1 2;3 4];a(:,:,2)=rand(2,2) or directly using matrix function.

Entries can be booleans, encoded integers of any inttype, real or complex numbers, polynomials, rationals, strings, booleans.

The number of dimension of hypermatrices with right-most sizes equal to 1 are automatically reduced. An hypermatrix with only two dimensions is automatically changed to a regular matrix (type 1).


a(1,1,1,1:2)=[1 2]
a=[1 2;3 4];a(:,:,2)=rand(2,2)


a(:,:,1) //dimensionality reduction

[a a]

See also

  • zeros — matrix made of zeros
  • ones — matrix made of ones
  • grand — Random numbers
  • matrix — reshapes an array with the same number and order of components
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:26:51 CET 2018