Description of goal:
I'm trying to get matlab to determine if the computer is running windows, or mac. My main goal for this is to write a robust script to determine what serial ports are available, and USB ports (for the same reason) to identify which is an Arduino.
Current work:
I have a script that queries the registry on Windows and successfully identifies this information. However, I'm trying to make this script robust and identify for both mac and windows.
Request: If there is a better way to do this in matlab? And how do I do it robustly, hopefully independent of OS if possible, or if not, how do I do this on a Mac! Note, (instrfindall) only identifies objects to ports, which are therefore already open. So it is sadly not a solution.
EDIT: I can determine if it's MAC or WINDOWS via ismac, and ispc calls. However, the main guts of this question still remains!