MATLAB: How to delete n element from structure

structures

How an element can be deleted from a structure. Structure is having only one field.

Best Answer

% Make a structure with one field
% and an array in that field.
s.field1 = [1,2,3,4,5];
% Delete element 4 from the array in field1
s.field1(4) = []