6 if isempty(field2KeepList)
11 if ischar(field2KeepList)
12 field2KeepList={field2KeepList};
15 initFieldList=fieldnames(InpStruct);
16 fieldList=setdiff(initFieldList,field2KeepList);
17 ResStruct=rmfield(InpStruct,fieldList);
20 isExist=
ismember(field2KeepList,initFieldList);
22 indBad=find(~isExist,1,'first');
24 'InpStruct does not contain %s field', field2KeepList{indBad});
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
function fieldfilterstruct(in InpStruct, in field2KeepList, in isCheckField)
FIELDFILTERSTRUCT leaves in input structure array only specified fields.
function ismember(in leftVec, in rightVec, in varargin)
ISMEMBER - ismember implementation for arrays of any type.