MATLAB: How to delete an element from a structure

structure

I have this
k.range = [-pi/4 pi/2] ;
k.init = sqrt(2)/2 ;
k.options = odeset('Events',@mystopper);
suppose I want to delete k.options how do I do it?
I found nothing in doc structure…

Best Answer

Douglas, use rmfield:
k = rmfield(k,'options');