How to remove column with 0 in matrix?
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Joshua Chhour
 el 6 de Jun. de 2023
  
    
    
    
    
    Comentada: KSSV
      
      
 el 6 de Jun. de 2023
            I have a 0x100x150 double, but how do I get rid of the zero, so it becomes 100x150?
Respuesta aceptada
  rakshit gupta
      
 el 6 de Jun. de 2023
        You can use the squeeze() function in MATLAB to remove dimensions with size 1 in a multidimensional array. 
The following code will give you, which is a 100x150 array but with same data as A. 
% assuming your 0x100x150 double is named A
B = squeeze(A); % remove dimensions with size 1
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Loops and Conditional Statements 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!


