ismac
Tests whether the program runs on macOS.
Category: Environment and Settings > Platform and License
Syntax
tf = ismac
Returns true on a Mac and false elsewhere.
Description
Use ismac to branch on platform-specific behavior, such as a different default font or shell command. Note that macOS is also a Unix system, so isunix is true on a Mac as well.
Output arguments
tf- Logical scalar.
Example
A logical flag
tf = ismac;
class(tf)
isscalar(tf)
Output
ans = 'logical'
ans = logical
1