Make the vector lin=[1 2 3 ⋯ 20] (the integers from 1 to 20), and then make every other value in it negative to get lin=[1 −2 3 −4 ⋯ −20] . what is the MATLAB code?
Mostrar comentarios más antiguos
lin=[1:20]
then?
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 11 de Jul. de 2015
Editada: Azzi Abdelmalek
el 11 de Jul. de 2015
a=-(1:20)
Categorías
Más información sobre Descriptive Statistics 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!