Remove NaN and create one column
    1 visualización (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Damith
      
 el 3 de Jul. de 2014
  
    
    
    
    
    Comentada: Damith
      
 el 4 de Jul. de 2014
            Hi,
I have a matrix A (31 x 12) which has NaN values and need to remove all NaN values and make it a one column (:). How can I do it MATLAB?
1 comentario
  per isakson
      
      
 el 4 de Jul. de 2014
				
      Editada: per isakson
      
      
 el 4 de Jul. de 2014
  
			Delete one of your two nearly identical questions!
Respuesta aceptada
  per isakson
      
      
 el 4 de Jul. de 2014
        "I have this matrix A and has NaN values. I need
- to remove NaN values from all the columns and
- write the values into one column (:)."
Step one is not possible because it would result in columns with different length.
Switching the order of the steps will return a result
    A = A(:);
    A( isnan( A ) ) = [];
Más respuestas (0)
Ver también
Categorías
				Más información sobre Logical 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!

