How to extract a value from a Row or Column vector?

49 visualizaciones (últimos 30 días)
Sean St Cyr
Sean St Cyr el 23 de Jun. de 2020
Comentada: SCE el 27 de Feb. de 2024
Im trying to take the 5th value of a randomly generated row or column vector. How would I write the code for that?
  2 comentarios
Star Strider
Star Strider el 23 de Jun. de 2020
See the documentation on Matrix Indexing for details.
Is this as homework assignment?
SCE
SCE el 27 de Feb. de 2024
A= V(5)
Simply write this!:)

Iniciar sesión para comentar.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 23 de Jun. de 2020
Is this what you are looking for ?
MyVector=rand(100,1);
MyData=MyVector(5);

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB 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!

Translated by