| Purpose |
| Updates the iteration progress window and handles the callback functions of its buttons. |
| Syntax |
[E,stop,brk] = update_ipwin(E,e,d,wp,x1,x2,x3,x4,x5)
|
| Description |
update_ipwin() updates the iteration number and mean square error (MSE) values on the
iteration progress window (IPWIN) shown in Fig. 9.11, and manages the actions to
be taken when one of the four buttons is pressed (see init_ipwin() for description
of the IPWIN widgets). The first three input arguments to update_ipwin() are used
to calculate the new MSE value that appear on the IPWIN and update the MSE vector. The input
and desired signals are considered ergodic processes, therefore time averages are used to
calculate the MSE instead of ensample averages. The fourth input parameter tells
update_ipwin() which plotting function to call when the Plot button is pressed.
The rest of the input arguments are passed to the plotting function without modification.
update_ipwin returns the updated MSE vector and two control variables to be used
for managing the Stop and Break buttons. The variables of update_ipwin()
are summarized below.
Input variable
E : mean square error vector
e : new error sample (column vector for block processing)
d : new desired sample (column vector for block processing)
wp : plot function to call, must be one of the following
'l' => calls plot_ale
'a' => calls plot_anvc
'b' => calls plot_beam
'e' => calls plot_echo
'i' => calls plot_invmodel
'p' => calls plot_predict
'm' => calls plot_model
x1-x5: parameters passed to the plot_xyz functions
Output variables
E : updated learning curve vector
stop : control flag [0 = continue, 1 = stop]
brk : flag for breaking out of processing loop
|
| Example |
%% Typical processing loop using IPWIN for (m=1:inSize) % read new input sample (x) and new desired sample % (d) and update the adaptive filter (w) here % update the iteration progress window [E, stop,brk] = update_ipwin(E,e,d, 'm', wp, h); % handle the Stop button while (stop ~= 0), stop = getStop; end; % handle the Break button if (brk), plot_model(w,h,E); break; end; end; |
| Remarks |
The iteration progress window can be used with any of the applications supported by the adaptive signal processing toolbox. Note however that update_ipwin uses the following global variables stop, k_, des_, err_, pltf, brk, and ipw and it is not recommended to use the same variable names in your applications that make use of the iteration progress window.
|
| See Also |
| INIT_ IPWIN, PLOT_ ALE, PLOT_ ANVC, PLOT_ BEAM, PLOT_ ECHO, PLOT_ INVMODEL, PLOT_ MODEL, PLOT_ PREDICT. |