?? matrixtoalist.m
字號:
function [n_vector,m_vector,n_length,m_length] = MatrixToAlist(Array)
%[n_vector,m_vector] = MatrixToAlist(Array)
[row,column] = size(Array);
%make the m_vector
for i=1:row
count = 1;
for j = 1:column
if(Array(i,j) == 1)
m_vector(i,count) = j;
count = count + 1;
end
end
m_length(1,i) = count-1;
end
%make the n_vector
for j=1:column
count = 1;
for i = 1:row
if(Array(i,j) == 1)
n_vector(j,count) = i;
count = count + 1;
end
end
n_length(1,j) = count-1;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -