www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgproject/isProjectFile.m
function [OK,s]= isProjectFile(CGP,Filename) %ISPROJECTFILE check for validade cage file % % OK= isProjectFile(MP,Filename); % Inputs % CGP cgproject object % Filename name of project file % Output % OK true if file is a project file % Copyright 2014 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin==1 Filename= CGP.Filename; end if exist(Filename,'file') try s= whos('-file',Filename); OK = isscalar(s) && strcmp(s.name,'PROJ'); catch OK=false; s=[]; end else OK= false; s=[]; end