MATLAB: How to determine the Windows Operating System I am working on from within MATLAB 7.11 (R2010b)

getenvMATLABospcwinwin7windows_ntwindows7winxp

I am migrating my code from Windows XP to Windows 7 and want to know how to determine my Operating System from within MATLAB.

Best Answer

You may determine the exact Windows Operating System from within MATLAB using:
system_dependent('getos')
You may also use the following function to get the version of your Windows Operating System:
system_dependent('getwinsys')