| MATLAB® | ![]() |
str = computer
archstr = computer('arch')
[str,maxsize] =
computer
[str,maxsize,endian] = computer
str = computer returns the string str with the computer type on which MATLAB is running.
archstr = computer('arch') returns the string archstr which is the architecture of the build platform. Use this string for the term arch in the mex command switch -arch.
[str,maxsize] = computer returns the integer maxsize, the maximum number of elements allowed in an array with this version of MATLAB.
[str,maxsize,endian] = computer returns either 'L' for little-endian byte ordering or 'B' for big-endian byte ordering.
| Platform | Word Size | str | archstr | maxsize | endian | ispc | isunix | ismac |
|---|---|---|---|---|---|---|---|---|
32-bit | PCWIN | win32 | 2^31 - 1 | L | 1 | 0 | 0 | |
64-bit | PCWIN64 | win64 | 2^48 - 1 | L | 1 | 0 | 0 | |
32-bit | 2^31 - 1 | L | 0 | 1 | 0 | |||
64-bit | GLNXA64 | glnxa64 | 2^48 - 1 | L | 0 | 1 | 0 | |
Apple® Macintosh | MACI | maci | 2^31 - 1 | L | 0 | 1 | 1 | |
| MACI64 | maci64 | 2^48 - 1 | L | 0 | 1 | 1 | ||
64-bit | SOL64 | sol64 | 2^48 - 1 | B | 0 | 1 | 0 |
In some cases, both 32-bit and 64-bit versions of MATLAB can run on the same platform. In this case, the value returned by computer reflects which of these is running. For example, if you run a 32-bit version of MATLAB on a Windows x64 platform, computer returns PCWIN, indicating that the 32-bit version is running.
getenv, setenv, ispc, isunix, ismac
![]() | complex | cond | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |