How do I cut a vector from the end of a vector of a certain length and keep it in an independent vector
    19 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    reta jon
 el 31 de Jul. de 2021
  
    
    
    
    
    Comentada: reta jon
 el 31 de Jul. de 2021
            How do I cut a vector from the end of a vector of a certain length and keep it in an independent vector
A=[1 2 3 4 5 6 7 8 9]
result
B=[1 2 3 4 5 6 7]
C=[8 9]
0 comentarios
Respuesta aceptada
  Chunru
      
      
 el 31 de Jul. de 2021
        A=[1 2 3 4 5 6 7 8 9]
cutpoint = 7;
B=A(1:cutpoint)
C=A(cutpoint+1:end)
7 comentarios
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!


