?? terminate.m
字號:
function [bter, kter, obkn] = terminate(b, k, obk, term)% DESCRIPTION [bter, kter, obkn] = terminate(b, k, obk, term)% INPUT% b -- Base index for each link. Size is #links by one. % k -- Channel index for each link. Size is #links by one.% The value NaN indicates not in use.% obk -- Binary matrix. Zero indicate occupied channel.% term -- A binary vector of the same size as b and k indicating% which links that are going to be released.% OUTPUT% bter -- Has the same size as respectively b.% kter -- Nan in all places where calls where terminated. Has the same size as k.% obkn -- Reflects the new allocation in the system. Has the same size as obk.% by Magnus Almgren 000505if isempty(b) bter = zeros(0,1); kter = zeros(0,1); obkn = obk; return% break end% NaN indicates not used any morebter = b;bter(term) = nan;kter = k;kter(term) = nan;% release channels ind = index(b(term),k(term),size(obk));obkn = obk;obkn(ind) = obkn(ind) + 1; % Mark as available.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -