How to select specific elements of a matrix and save them in another matrix?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Let's say I have matrix A=[1; 2 ;3; 6; 7 ;8 ;11 ;12 ;13]
I need a script which goes through matrix A one by one and defines the elements which A(k+1)-A(k)>1
then I need that elements to be saved in matrix B
so B=[6; 11]
0 comentarios
Respuestas (1)
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!