computer

Information about computer on which MATLAB software is running

Syntax

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

Description

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

archstr = computer('arch') returns the string archstr which is used by the mex command -arch switch.

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

PlatformWord
Size
strarchstrmaxsizeendianispcisunixismac

Microsoft Windows

32-bit

PCWINwin322^31 - 1L100

64-bit

PCWIN64win642^48 - 1L100

Linux

64-bit

GLNXA64

glnxa64

2^48 - 1L010

Apple Macintosh

64-bit

MACI64maci642^48 - 1L011

More About

expand all

Tips

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 are 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. You can get this information and the value of archstr from the Help menu, as described in Information About your Installation.

See Also

| | | |

Was this topic helpful?