create a matrix that keeps only the sequential numbers
Mostrar comentarios más antiguos
Hi! I need to create a matrix that keeps only the sequential numbers in the first column (and keep the corresponding number in the second column) and delete everything else. Here is an example:

3 comentarios
Akira Agata
el 3 de Ag. de 2023
What happens if the 1st column consists of two sequential numbers, like: [1 2 3 4 7 8 9 10]' ?
Alberto Acri
el 3 de Ag. de 2023
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!