Home > cellorganizer > utilities > hasToolbox.m

hasToolbox

PURPOSE ^

HASTOOLBOX True iff the current system has the Matlab toolbox available,

SYNOPSIS ^

function answer = hasToolbox( name )

DESCRIPTION ^

HASTOOLBOX True iff the current system has the Matlab toolbox available,
false otherwise

 Examples
 > hastoolbox('Image Processing Toolbox');
 > hastoolbox('spline toolbox');

 See also ISCOMPATIBLE

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function answer = hasToolbox( name )
0002 %HASTOOLBOX True iff the current system has the Matlab toolbox available,
0003 %false otherwise
0004 %
0005 % Examples
0006 % > hastoolbox('Image Processing Toolbox');
0007 % > hastoolbox('spline toolbox');
0008 %
0009 % See also ISCOMPATIBLE
0010 
0011 % Author: Ivan E. Cao-Berg (icaoberg@cmu.edu)
0012 % Created: July 10, 2007
0013 % Last Update: March 2, 2008
0014 %
0015 % Copyright (C) 2008 Center for Bioimage Informatics/Murphy Lab
0016 % Carnegie Mellon University
0017 %
0018 % This program is free software; you can redistribute it and/or modify
0019 % it under the terms of the GNU General Public License as published
0020 % by the Free Software Foundation; either version 2 of the License,
0021 % or (at your option) any later version.
0022 %
0023 % This program is distributed in the hope that it will be useful, but
0024 % WITHOUT ANY WARRANTY; without even the implied warranty of
0025 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0026 % General Public License for more details.
0027 %
0028 % You should have received a copy of the GNU General Public License
0029 % along with this program; if not, write to the Free Software
0030 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0031 % 02110-1301, USA.
0032 %
0033 % For additional information visit http://murphylab.web.cmu.edu or
0034 % send email to murphy@cmu.edu
0035 
0036 if( nargin ~= 1 )
0037     error( 'CellOrganizer: Wrong number of input arguments' );
0038 else
0039     answer = false;
0040     information = ver;
0041     for( i = 1:1:length( information ) )
0042         if( strcmpi( information(i).Name, name ) )
0043             answer = true;
0044             return;
0045         end
0046     end
0047 end
0048 end%hasToolbox

Generated on Sun 29-Sep-2013 18:44:06 by m2html © 2005