Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - English

Change language to:
Français - 日本語 - Português - Русский

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

Scilab Help >> Data Structures > types > hypermatrices

hypermatrices

a Scilab object, N dimensional matrix in Scilab

Description

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).

Examples

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

size(a)

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

[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
Report an issue
<< hypermat types matrices >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 14:57:23 CET 2019