Main Content

isunix

Determine if version is for Linux or Mac platforms

Description

example

tf = isunix returns logical 1 (true) if the version of MATLAB® is for Linux® or Apple macOS platforms. 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

Extended Capabilities

See Also

| | | |

Introduced before R2006a