function fl=IVPfplot(PROBLEM,SOLVER,indsol,flout,PATH) // Plot of the solution computed by the solvers // Tested on SCILAB 4.0 // // INPUT // PROBLEM : name of the IVPtestset problem // SOLVER : name of the IVPtestste solver // indsol : index of the printed component defined in the function // setoutput // flout : optional flag = 1 the eps file are printed // 0 (default) no eps output // PATH : optinal : location of the input data file // // OUTPUT // fl : flag = 0 normal return // //--------------------------------------------------------------------- // This file is part of the Test Set for IVP solvers // http://www.dm.uniba.it/~testset/ // // // DISCLAIMER: see // http://www.dm.uniba.it/~testset/disclaimer.php // // The most recent version of this source file can be found at // http://www.dm.uniba.it/~testset/tests/IVPfplot.sci // // This is revision // $Id: IVPfplot.sci,v 1.2 2006/10/06 11:51:25 testset Exp $ //----------------------------------------------------------------------- fl = 0; rhs = argn(2) if rhs < 3 then fl = 1; error('The input parameters are: PROBLEM, SOLVER, ind, flout') end if rhs < 4 then flout = 0; end if rhs < 5 then PATH =''; end nfile = strcat([convstr(PROBLEM,'l'),convstr(SOLVER,'u'),'.txt'],'') ndata=fscanfMat(nfile); nind = length(indsol); for i=1:nind h = figure(i); f = scf(h); plot(ndata(:,1),ndata(:,i+1)) xtitle(msprintf('PROBLEM= %s, SOLVER = %s, component = %g ',PROBLEM,SOLVER,indsol(i))); if flout then epsfile = sprintf('%s%s_%g',PROBLEM,SOLVER,i); xs2eps(h,epsfile); end close(h) end endfunction