structrows.m

来自「医学图像处理matlab工具箱」· M 代码 · 共 13 行

M
13
字号
function S = structrows(L,in)
% STRUCTROWS Selects rows of a table from XLS2STRUCT
%
% S = STRUCTROWS(L,IN) selects the rows in IN from the structure L and
% outputs them in the structure S.


f = fieldnames(L);
for i = 1:length(f)
  v = L.(f{i});
  S.(f{i}) = v(in);
end

⌨️ 快捷键说明

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