MATLAB cannot perform any performance optimization on statements called by
eval
. This can cause code to run less efficiently.
eval
statements make code less clear and cause issues
with sharing and maintaining code.
To make calls to the operating system use the system function instead without the '!' at the beginning of the command:
Old | New |
---|---|
eval( [ '!open -a "Google Chrome" ''', openUrl, '''' ] )
|
system( [ 'open -a "Google Chrome" ''', openUrl, '''' ] )
|