Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

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

PlatformWord
Size
strarchstrmaxsizeendianispcisunixismac

Microsoft Windows

32-bit

PCWINwin322^31 - 1L100

64-bit

PCWIN64win642^48 - 1L100

Linux®

32-bit

GLNX86

glnx86

2^31 - 1L010

64-bit

GLNXA64

glnxa64

2^48 - 1L010

Apple® Macintosh

32-bit

MACImaci2^31 - 1L011

64-bit

MACI64maci642^48 - 1L011

Sun Solaris™

64-bit

SOL64sol642^48 - 1B010

Remarks

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. You can get this information and the value of archstr from the Help menu, as described in Getting Version and License Information in the Desktop Tools and Development Environment documentation.

See Also

getenv, setenv, ispc, isunix, ismac

  


Recommended Products

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