www.pudn.com > communicationmatlab.rar > SVIPLOT4.M


    function   x = sviplot4(input); 
 
%This function is only used by Call back MATLAB from C-mex funcitons sviterbi.c  
%  Copyright (c) 1996 The MathWorks, Inc. 
%  All Rights Reserved 
%  
% See also sviplot1, sviplot2, sviplot3 
 
    fig_position = input(1); 
    leng = input(2); 
    starter = input(3); 
    num_state = input(4); 
    dec = input(5); 
    plot_flag = input(6); 
 
    handles = get(input(7), 'UserData'); 
	 
    plot_curv_x = [get(handles(3), 'XData'), NaN]; 
    plot_curv_y = [get(handles(3), 'YData'), NaN]; 
    if length(plot_curv_x) > 3 * plot_flag 
        leng_x = length(plot_curv_x); 
        limi    = leng_x - 3 * plot_flag + 1; 
        plot_curv_x = plot_curv_x(limi:leng_x); 
        plot_curv_y = plot_curv_y(limi:leng_x); 
    end; 
 
    set(handles(3), 'XData', [plot_curv_x, fig_position-leng+.1, fig_position-leng+1],... 
                      'YData', [plot_curv_y, bi2de(fliplr(de2bi(starter, num_state))),... 
                       bi2de(fliplr(de2bi(dec, num_state)))]); 
%    drawnow