%% 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)

% Copyright 2012 The MathWorks, Inc.