getident.m

来自「模式识别工具箱。非常丰富的底层函数和常见的统计识别工具」· M 代码 · 共 32 行

M
32
字号
%GETIDENT Get fields of object descriptors%%    IDENTFIELD = GETIDENT(A,FIELD,N)%% INPUT%   A          Dataset%   FIELD      Character string: name of structure field of IDENT field of A.%   N          Vector of indices pointing to desired objects in A, %              default: all.%% OUTPUT%   IDENTFIELD Cell rray of size (N,1) containing the requested field of the%              objects A(N,:).%% If FIELD is the empty string ('') the entire ident structure is returned.% If the requested field does not exist IDENTFIELD = [];%% Note the ident field of datasets was originally intended for an% identification of the individual objects. Later its usage was extended % to a field for storing general information on objects. For that reason 'old'% datasets without a structure in the ident field are transformed such that% this information is stored in a subfield IDENT in the ident field. It can% be retrieved by GETIDENT(A) or GETIDENT(A,J).%% IDENTFIELD is a cell array as arbitrary parameters may be stored. If% these are doubles, e.g. after A = SETIDENT(A,[1:SIZE(A,1)]'), they can% be easily converted by N = CELL2MAT(GETIDENT(A));%% For backward compatibility the following holds: If FIELD = 'string'% then IDENTFIELD contains a character array of the object identifiers stored% in A.IDENT.IDENT. If these are integers they are converted to strings.

⌨️ 快捷键说明

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