printstruct.m
来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 27 行
M
27 行
%function st = printStruct(output)%% prints structure fields, one to a line, to string, 'st'function st = printStruct(output)st='';if ~isempty(output) fn=fieldnames(output); for jj=1:length(fn) tmpNm=fn{jj}; thisField=getfield(output,tmpNm); isTooBig = prod(size(thisField))>5; if ((~isTooBig | ischar(thisField)) & ~isempty(thisField)) if isnumeric(thisField) thisField=num2str(thisField(:)'); end nxt=[tmpNm '=' thisField]; st = [st sprintf('%s\n',nxt)]; end endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?