📄 sviplot2.m
字号:
function x = sviplot2(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);
plot_flag = input(3);
n_std_sta = input(4);
x(1) = input(5);
handles = get(x(1), 'UserData');
set(handles(1), 'XLim', [fig_position-leng, fig_position + plot_flag - leng]);
plot_curv_x = get(handles(2), 'XData');
plot_curv_y = get(handles(2), 'YData');
index = find(plot_curv_x == -(fig_position - leng));
leng_x = length(plot_curv_x);
if isempty(index)
% no move
else
plot_curv_x = plot_curv_x(index(1)+2: leng_x);
plot_curv_y = plot_curv_y(index(1)+2: leng_x);
end;
set(handles(2), 'XData', plot_curv_x, 'YData', plot_curv_y);
for i = 0:n_std_sta - 1
tmp = get(handles(5+n_std_sta+i), 'Position');
tmp(1) = fig_position-leng-plot_flag/8;
set(handles(5+n_std_sta+i), 'Position', tmp);
end;
tmp = get(handles(5+2*n_std_sta), 'Position');
tmp(1) = fig_position-leng+plot_flag/2.1;
set(handles(5+2*n_std_sta), 'Position', tmp);
plot_curv_x = get(handles(4), 'XData');
plot_curv_y = get(handles(4), 'YData');
index = find(plot_curv_x <= fig_position-leng);
index = max([index(length(index)) 0]) + 1;
leng_x = length(plot_curv_x);
plot_curv_x = plot_curv_x(index : leng_x);
plot_curv_y = plot_curv_y(index : leng_x);
set(handles(4), 'XData', plot_curv_x, 'YData', plot_curv_y);
%end of sviplot2.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -