Main Content

ismac

Determine if version is for macOS platform

Description

example

tf = ismac returns logical 1 (true) if the version of MATLAB® software is for the Apple macOS platform. Otherwise, it returns logical 0 (false).

Examples

collapse all

if ismac
    % Code to run on Mac platform
elseif isunix
    % Code to run on Linux platform
elseif ispc
    % Code to run on Windows platform
else
    disp('Platform not supported')
end

Tips

  • The isunix function also determines if version is for macOS platforms.

Extended Capabilities

See Also

| | | |

Introduced in R2007a