www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RemoveMultipleFieldsExample.m
%% Remove Multiple Fields %% % Define a scalar structure with fields |first|, |second|, |third|, and % |fourth|. S.first = 1; S.second = 2; S.third = 3; S.fourth = 4; %% % Remove fields |first| and |fourth|. fields = {'first','fourth'}; S = rmfield(S,fields)