how delete empty fields in a struct
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    elisa ewin
 el 11 de Mayo de 2016
  
    
    
    
    
    Comentada: Lynn McCane
 el 26 de Jun. de 2023
            Hi! I have a struct (attached) and I want to delete the empty field, how can I do?
0 comentarios
Respuesta aceptada
  Andrei Bobrov
      
      
 el 11 de Mayo de 2016
        
      Editada: Andrei Bobrov
      
      
 el 11 de Mayo de 2016
  
      out = {t(~cellfun(@isempty,{t.places})).places};
t = cell2struct(out,{'places'},1);
or jast
t = t(~cellfun(@isempty,{t.places}));
1 comentario
Más respuestas (0)
Ver también
Categorías
				Más información sobre Structures en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


