Monday, May 19, 2014

mac vs. pc matlab continued

Might have more posts here soon since I just agreed to be a guinea pig for a software documentation project and they already picked apart my first very simple script for not being componentized, not cross platform, and has lots of runtime dependencies.

From stack overflow. Actual functions to make code cross-platform.

Of course, if you try to access a Windows-style path on a Mac, it will error.
MATLAB includes a set of functions that make it fairly easy to make your code cross-platform with respect to these sorts of issues. Take a look at, for example, the functions fullfilefilepartsfileseppathsepispc, and ismac.