21 if ~isa(ea,
" EstimatorAnalyzer ")
22 error(
" The first argument must be a EstimatorAnalyzer instance. ");
25 pidx = ea.ReducedModel.getParamIndexFromName(param);
29 pname = ea.ReducedModel.System.Params(pidx).Name;
31 error(
" param must be either a char array (parameter name) or positive parameter index ");
33 npar = length(paramvals);
35 error(
" Parameter values to sweep must be given. ");
51 [T, MU] = meshgrid(ea.Model.Times,paramvals);
52 tit = sprintf(
" Error estimator analysis for parameter sweep of '%s' from %1.3f to %1.3f, base \\mu = [%s] ",...
53 pname,paramvals(1),paramvals(end),num2str(mu^
t));
68 inv = figure(
" Visible ",
" off ");
73 for idx = 1:size(errs,1)
75 Z = squeeze(errs(idx,:,:))^
t;
77 h = surf(iax,T,MU,Z,
" EdgeColor ",
" none ");
78 cd[idx] =
get(h,
" CData ");
84 xlabel(
" Time t "); ylabel(sprintf(
" Parameter %s value ",pname)); zlabel(
" Error estimates ");
85 zlim(ax,[emin*.9 max(emin,1e4)]);
89 for idx = 1:size(errs,1)
92 ncd = size(cm,1)*max(ncd(:))./ncd;
93 set(h,
" CData ",ncd,
" CDataMapping ",
" direct ");
A MatLab cell array or matrix.
function [ Y , E ] = EstimatorParamSweep(ea, mu, unused1, param,rowvec< double > paramvals)
ParamSweep: Plots the output with error bounds for a range of one specified parameter.
function res = isposintscalar(value)
isposintscalar: Backwards-compatibility function for matlab versions greater than 2012a ...