say I have a vector v=[1 2 5 6 -8 5 2 7]
and I to create a new vector that has all the elements until the negative number shows up
such as c=[1 2 5 6]
how would you do this without using a while loop

 Respuesta aceptada

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2017a

Etiquetas

Preguntada:

el 14 de Feb. de 2019

Respondida:

el 14 de Feb. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by