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, 2013-07-16
0009 %
0010 
0011 fprintf('*** RAVEN TOOLBOX v. 1.07\n');
0012 
0013 %Check if RAVEN is in the path list
0014 paths=strread(path,'%s','delimiter', pathsep);
0015 
0016 %Get the RAVEN path
0017 [ST I]=dbstack('-completenames');
0018 ravenDir=fileparts(ST(I).file);
0019 
0020 if ismember(ravenDir,paths)
0021     fprintf('Checking if RAVEN is in the Matlab path... PASSED\n');
0022 else
0023     fprintf('Checking if RAVEN is in the Matlab path... FAILED\n');
0024     addMe=input('\tWould you like to add the RAVEN directory to the path list? Y/N\n','s');
0025     if strmatch(lower(addMe),'y')
0026         addpath(ravenDir);
0027         savepath
0028     end
0029 end
0030 
0031 excelFile=fullfile(ravenDir,'tutorial','empty.xlsx');
0032 xmlFile=fullfile(ravenDir,'tutorial','empty.xml');
0033 tempName = tempname;
0034 
0035 %Check if it is possible to parse an Excel file
0036 try
0037     SBMLFromExcel(excelFile,tempName,false,false);
0038     delete(tempName);
0039     fprintf('Checking if it is possible to parse a model in Microsoft Excel format... PASSED\n');
0040 catch
0041     fprintf('Checking if it is possible to parse a model in Microsoft Excel format... FAILED\n');
0042     if ispc==false %Print info for UNIX/MacOS
0043         fprintf('\tThis functionality uses Microsoft Excel COM server, which works best for the Windows version of Matlab\n');
0044     end
0045 end
0046 
0047 %Check if it is possible to import an SBML model using libSBML
0048 try
0049     smallModel=importModel(xmlFile);
0050     fprintf('Checking if it is possible to import an SBML model using libSBML... PASSED\n');
0051 catch
0052     fprintf('Checking if it is possible to import an SBML model using libSBML... FAILED\n');
0053 end
0054 
0055 %Check if it is possible to solve a LP problem using Mosek
0056 try
0057     solveLP(smallModel);
0058     fprintf('Checking if it is possible to solve a LP problem using Mosek... PASSED\n');
0059 catch
0060     fprintf('Checking if it is possible to solve a LP problem using Mosek... FAILED\n');
0061 end
0062 end

Generated on Tue 16-Jul-2013 21:50:02 by m2html © 2005