Remove specific entry in a cell array
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    bbah
 el 21 de Nov. de 2019
  
    
    
    
    
    Respondida: JESUS DAVID ARIZA ROYETH
      
 el 21 de Nov. de 2019
            in my cell arrays the last number is a 0 or a -1. i want to delete only that value from every cell array
e.g
input:
element_row{1,1} = [1 10 18 24 31 40 0]
element_row{1,2} = [2 11 19 25 32 41 49 -1]
output:
element_row{1,1} = [1 10 18 24 31 40]
element_row{1,2} = [2 11 19 25 32 41 49]
thank you
0 comentarios
Respuesta aceptada
  JESUS DAVID ARIZA ROYETH
      
 el 21 de Nov. de 2019
        solution: 
element_row{1,1} = [1 10 18 24 31 40 0]
element_row{1,2} = [2 11 19 25 32 41 49 -1]
element_row{1,1}(end)=[];
element_row{1,2}(end)=[];
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!

