?? find_index.m
字號:
function index = find_index(num,table)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% Name: find_index.m %
%% %
%% Description: It receives a table and a number to look for in %
%% first column. %
%% %
%% Result: It gives back the corresponding value of the second %
%% column. %
%% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dim = size(table);
num_col = dim(1);
for i=1:num_col
if num==table(i,1);
index = table(i,2);
return
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
減小字號
Ctrl + -