在Matlab中输入help ispc命令会显示 :
ispc True for the PC (Windows) version of MATLAB.
ispc returns 1 for PC (Windows) versions of MATLAB and 0 otherwise.
注释:ispc用来判断当前的电脑系统是否是windows系统,是返回1,不是返回0
这是我碰到的一个老外的代码,他的代码只支持Linux系统
if ispc
error('This code is not supported on Windows.');
end