computer - Information about computer on which MATLAB is running - MATLAB (original) (raw)
Main Content
Information about computer on which MATLAB is running
Syntax
Description
[str](#mw%5F3696ad34-b9ba-4806-b8c9-b0c5c80b416c) = computer
returns the computer type on which MATLAB® is running.
[archstr](#mw%5F84beda3f-a155-4825-a5b3-0a6f460525f3) = computer('arch')
returns the system architecture. The mex command and standalone applications use this value to locate MATLAB library files.
[[str](#mw%5F3696ad34-b9ba-4806-b8c9-b0c5c80b416c),[maxsize](#mw%5F8ff58239-4263-4b9f-a268-dca6d56922ac)] = computer
returns the maximum number of elements allowed in an array with this version of MATLAB.
[[str](#mw%5F3696ad34-b9ba-4806-b8c9-b0c5c80b416c),[maxsize](#mw%5F8ff58239-4263-4b9f-a268-dca6d56922ac),[endian](#mw%5F58e0ab57-c262-417e-877b-ad92588fea92)] = computer
returns the endian byte order format.
Output Arguments
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
Usage notes and limitations:
- Information about the computer on which the generated code is running.
- Use only when the code generation target is S-function (Simulation) or MEX-function.
Version History
Introduced before R2006a