Main Content

computer

Information about computer on which MATLAB is running

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

  • 'MACA64' - 64-bit macOS platform, Apple silicon

System architecture, returned as a character vector.

  • 'win64' - 64-bit Windows platform

  • 'glnxa64' - 64-bit Linux platform

  • 'maci64' - 64-bit macOS platform

  • 'maca64' - 64-bit macOS platform, Apple silicon

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

Version History

Introduced before R2006a

See Also

| | | | |

External Websites