computer

Information about computer on which MATLAB is running

Syntax

str = computer
archstr = computer('arch')
[str,maxsize] = computer
[str,maxsize,endian] = computer

Description

str = computer returns the computer type on which MATLAB® is running.

archstr = computer('arch') returns the system architecture. The mex command and standalone applications use this value to locate MATLAB library files.

[str,maxsize] = computer returns the maximum number of elements allowed in an array with this version of MATLAB.

[str,maxsize,endian] = computer returns the endian byte order format.

Output Arguments

collapse all

Computer type, returned as a character vector.

  • 'PCWIN64' - 64-bit Windows® platform

  • 'GLNXA64' - 64-bit Linux® platform

  • 'MACI64' - 64-bit macOS platform

System architecture, returned as a character vector.

  • 'PCWIN64' - 64-bit Windows platform

  • 'GLNXA64' - 64-bit Linux platform

  • 'MACI64' - 64-bit macOS platform

Maximum number of elements allowed in an array, returned as double.

Endian byte order format, returned as a character vector.

  • 'L' - little-endian byte ordering for 64-bit Windows, Linux, and macOS platforms

  • 'B' - big-endian byte ordering

Algorithms

For 64-bit Windows platforms:

For 64-bit Linux platforms:

  • ispc returns 0 (false)

  • isunix returns 1 (true)

  • ismac returns 0 (false)

For 64-bit macOS platforms:

  • ispc returns 0 (false)

  • isunix returns 1 (true)

  • ismac returns 1 (true)

Extended Capabilities

See Also

| | | | |

External Websites

Introduced before R2006a