필터 지우기
필터 지우기

How do I delete an element from a structure?

조회 수: 2 (최근 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 CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by