Borrar filtros
Borrar filtros

How do I delete an element from a structure?

2 visualizaciones (últimos 30 días)
Douglas Alves
Douglas Alves el 29 de Mayo de 2014
Comentada: Douglas Alves el 29 de Mayo de 2014
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...

Respuesta aceptada

Mischa Kim
Mischa Kim el 29 de Mayo de 2014
Editada: Mischa Kim el 29 de Mayo de 2014
Douglas, use rmfield:
k = rmfield(k,'options');
  1 comentario
Douglas Alves
Douglas Alves el 29 de Mayo de 2014
ohh Perfect!! I didn't know that. Thank you a lot Mischa!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by