Home > RAVEN > checkInstallation.m

checkInstallation

PURPOSE ^

checkInstallation

SYNOPSIS ^

function checkInstallation()

DESCRIPTION ^

 checkInstallation
   The purpose of this function is to check if all necessary functions are
   installed and working

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function checkInstallation()
0002 % checkInstallation
0003 %   The purpose of this function is to check if all necessary functions are
0004 %   installed and working
0005 
0006 %   Usage: checkInstallation()
0007 %
0008 %   Rasmus Agren, 2014-01-06
0009 %
0010 
0011 fprintf('*** RAVEN TOOLBOX v. 1.08\n');
0012 
0013 %Check if RAVEN is in the path list
0014 paths=textscan(path,'%s','delimiter', pathsep);
0015 paths=paths{1};
0016 
0017 %Get the RAVEN path
0018 [ST I]=dbstack('-completenames');
0019 ravenDir=fileparts(ST(I).file);
0020 
0021 if ismember(ravenDir,paths)
0022     fprintf('Checking if RAVEN is in the Matlab path... PASSED\n');
0023 else
0024     fprintf('Checking if RAVEN is in the Matlab path... FAILED\n');
0025     addMe=input('\tWould you like to add the RAVEN directory to the path list? Y/N\n','s');
0026     if strcmpi(addMe,'y')
0027         addpath(ravenDir);
0028         savepath
0029     end
0030 end
0031 
0032 excelFile=fullfile(ravenDir,'tutorial','empty.xlsx');
0033 xmlFile=fullfile(ravenDir,'tutorial','empty.xml');
0034 
0035 %Check if it is possible to parse an Excel file
0036 try
0037     importExcelModel(excelFile,false,false,true);
0038     fprintf('Checking if it is possible to parse a model in Microsoft Excel format... PASSED\n');
0039 catch
0040     fprintf('Checking if it is possible to parse a model in Microsoft Excel format... FAILED\n');
0041     if ispc==false %Print info for UNIX/MacOS
0042         fprintf('\tThis functionality uses Microsoft Excel COM server, which works best for the Windows version of Matlab\n');
0043     end
0044 end
0045 
0046 %Check if it is possible to import an SBML model using libSBML
0047 try
0048     smallModel=importModel(xmlFile);
0049     fprintf('Checking if it is possible to import an SBML model using libSBML... PASSED\n');
0050 catch
0051     fprintf('Checking if it is possible to import an SBML model using libSBML... FAILED\n');
0052 end
0053 
0054 %Check if it is possible to solve a LP problem using Mosek
0055 try
0056     solveLP(smallModel);
0057     fprintf('Checking if it is possible to solve a LP problem using Mosek... PASSED\n');
0058 catch
0059     fprintf('Checking if it is possible to solve a LP problem using Mosek... FAILED\n');
0060 end
0061 end

Generated on Mon 06-Jan-2014 14:58:12 by m2html © 2005