installcheck.m

来自「这是一个基于matlab开发的关于c语言的图形转换程序,可实现直方图的生成和传输」· M 代码 · 共 33 行

M
33
字号
function installcheck()
%INSTALLCHECK Check the current installation.
%   A common error when unpacking the archive of program
%   files is to dump all the files into a single directory
%   instead of unpacking it with the proper directory 
%   hierarchy.  This function provides a simple check
%   to see if this occurred.
%
%   NOTE: To work this function MUST be placed in a directory
%   called private and called from the parent directory.
%
%   This function simply checks to see if it is contained
%   in a directory called private.  If so, it is more than
%   likely that the archive was unpacked correctly and no 
%   error is generated.  If it is not inside a private directory
%   then an error is generated which suggests to the user
%   a possible cause for the installation error.

% Jordan Rosenthal, 25-Mar-2000
% jr@ece.gatech.edu

k = findstr('private',mfilename);
if isempty(k),
   msg = ['This program has not been installed correctly. ', ...
         'The most probable cause of the problem is that the files ', ...
         'from the compressed archive were extracted into a single ', ...
         'directory instead of the retaining the original directory ', ...,
         'hierarchy.  If only a single directory of files currently ', ...
         'exists, please unpack the archive again using the retain ', ...
         'folders option in your decompression program. '];
   error(msg);
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?