https://github.com/Data2Dynamics/d2d
Tip revision: d72d4c223fb8adc0e3e44a1d3d1eafce18b995ae authored by Andreas Raue on 06 March 2015, 00:17:07 UTC
Increase C version code, after Joep's submits today to prevent compatibility problems
Increase C version code, after Joep's submits today to prevent compatibility problems
Tip revision: d72d4c2
arPlot.m
% Plot models and datasets
%
% arPlot(saveToFile, fastPlot, silent, evalfun, doLegends, dynamics)
%
% saveToFile [false]
% fastPlot [false]
% silent [false]
% evalfun [true]
% doLegends [true]
% dynamics: [true]
function arPlot(saveToFile, fastPlot, silent, evalfun, doLegends, dynamics)
global ar
if(isempty(ar))
error('please initialize by arInit')
end
if(~exist('saveToFile','var'))
saveToFile = false;
end
if(~exist('fastPlot','var'))
fastPlot = false;
end
if(~exist('silent','var'))
silent = false;
end
if(~exist('evalfun','var'))
evalfun = true;
end
if(~exist('doLegends','var'))
doLegends = true;
end
if(~exist('dynamics','var'))
dynamics = true;
end
if(isfield(ar.config, 'useNewPlots') && ar.config.useNewPlots)
arPlot2(saveToFile, fastPlot, silent, evalfun, doLegends, dynamics);
return;
end
if(evalfun)
try %#ok<TRYNC>
arSimu(false, true, dynamics);
end
try
if(silent)
arChi2(false, [], dynamics);
else
arChi2;
end
catch err_id
if(silent)
disp(err_id.message);
end
end
end
if(~isfield(ar.model, 'qPlotYs'))
for jm=1:length(ar.model)
if(length(ar.model(jm).plot) > 5)
fprintf('Automatic plotting disabled for model %i. Please use arTuner for plotting.\n', jm);
ar.model(jm).qPlotYs = false(1,length(ar.model(jm).plot));
ar.model(jm).qPlotXs = false(1,length(ar.model(jm).plot));
ar.model(jm).qPlotVs = false(1,length(ar.model(jm).plot));
else
ar.model(jm).qPlotYs = true(1,length(ar.model(jm).plot));
ar.model(jm).qPlotXs = false(1,length(ar.model(jm).plot));
ar.model(jm).qPlotVs = false(1,length(ar.model(jm).plot));
end
end
end
arPlotY(saveToFile, fastPlot, doLegends);
arPlotX(saveToFile, fastPlot);
arPlotV(saveToFile, fastPlot);