id_hop.m

来自「good for who wants it」· M 代码 · 共 40 行

M
40
字号
function varargout = id_hop(h, eventdata, handles, varargin)
% trgraph
global NET AKTWEZ STARTWEZ HIST DC

if AKTWEZ~=STARTWEZ
    NET=0; % whole network
    czyscosie;
    HIST=3; % ON if CHECK(2)==0
    [czy, opis]=czyopis('packet id', h, eventdata, handles);
    HIST=0; 
    if czy==0
        [hop, hopf, id, stime, tr]=wezhop(handles,1);
        if isempty(hop)
            hplot=wykrespusty(handles);
            zapisz_wykres(0, opis, handles);
        else            
            [id, index]=sort(id);
            hop=hop(index);
            [hplot,id,hop]=rysuj(id, hop, handles);
            zapisz_wykres([id, hop], opis, handles);
        end        
        plot_info(opis, eventdata, hplot, handles);
	xylabel('packet id',['number of intermediate nodes receiving packets sent from node ', ...
	num2str(AKTWEZ),' to node ', num2str(STARTWEZ)], hplot, handles);
    end
else
    NET=0; % whole network
    czyscosie;
    HIST=3; % ON if CHECK(2)==0
    [czy, opis]=czyopis('packet id', h, eventdata, handles);
    HIST=0;
    if czy==0
        hplot=wykrespusty(handles);
        zapisz_wykres(0, opis, handles);
        plot_info(opis, eventdata, hplot, handles);
	xylabel('packet id',['number of intermediate nodes receiving packets sent from node ', ...
	num2str(AKTWEZ),' to node ', num2str(STARTWEZ)], hplot, handles);
    end
end
zapisz_wykres_jpg(opis,handles);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?