plotMPStateEstimates¶
- plotMPStateEstimates(ss_est, ss_mdl, f_onoff, x_true, alpha_true, ss_gen, f_add_vol, f_transform, ofile_pref)¶
plotMPStateEstimates plots estimated states with uncertainties. Parameters for each peak are plotted in individual figures, with the parameters as separate subplots.
Parameters for each peak are plotted using the internal function plotStateEstimates. Additional internal functions getPeakVolume, combo2PickParams, combo2PickPeaks, and getCI are used to compute/extract necessary data.
- INPUTS:
ss_est – struct containing filter estimates. Required. ss_mdl – StateSpaceMultiPeak object with parameters used to
obtain filter estimates in ss_est. Required.
- f_onoff – binary flag indicating whether estimates and uncertainties
are plotted for all times or only their peak is on. 0 - estimates displayed at all times. 1 - estimates are not shown when peak is off.
x_true – dim_x x NT+1 matrix of true state values alpha_true – num_combos x NT+1 matrix of true On/Off-peak
combinations
ss_gen – depracated. No longer used. f_add_vol – binary flag indicating whether to compute and plot the
approximate volume of the peak in an additional subplot. 0 - do not compute and plot volume. 1 - compute and plot volume. Default is 0.
- f_transform – binary flag indicating whether estimates and uncertainties
are plotted as raw state values or as values transformed by the link/bound functions. 0 - raw values. 1 - transformed values. Default is 1.
- ofile_pref – path and filename prefix for saving figures.
Figures not saved if empty. Default is empty ‘’.
- OUTPUTS:
Figures generated. Figures saved if ofile_pref provided.
- Modified:
20200210 – Adds option to save by providing an outile prefix 20200203 – This version adds On-peak indicator subplot at top.
To do so, it has to add a distinction b/w on/off of the indicator plot of the peak and on/off of the state plots. This has to be handled in this outer function and the inner plotStateEstimates function.
Created: Patrick Stokes