?? indpart.m
字號:
function ind = indpart(dimb, dims)% DESCRIPTION ind = indpart(dims, dimb)% Calculates index from a smaller matrix into a bigger.% INPUT% dims -- The size of the smaller matrix.% dimb -- The size of the bigger matrix.% OUTPUT% ind -- An index in the first dimension.% TRY% indpart(size(ones(3,2)),size(ones(1,2)))% by Magnus Almgren 981001for j = 1:length(dims) v{j}=flatten(1:dims(j),j);endv{length(dims)+1} = dimb;ind = flatten(index(v{:}));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -