How do I delete an element from a structure?

1 回表示 (過去 30 日間)
Douglas Alves
Douglas Alves 2014 年 5 月 29 日
コメント済み: Douglas Alves 2014 年 5 月 29 日
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');
  1 件のコメント
Douglas Alves
Douglas Alves 2014 年 5 月 29 日
ohh Perfect!! I didn't know that. Thank you a lot Mischa!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by