How do I delete an element from a structure?

1 次查看(过去 30 天)
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...

采纳的回答

Mischa Kim
Mischa Kim 2014-5-29
编辑:Mischa Kim 2014-5-29
Douglas, use rmfield:
k = rmfield(k,'options');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by