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

Im trying to take the 5th value of a randomly generated row or column vector. How would I write the code for that?

2 commentaires

See the documentation on Matrix Indexing for details.
Is this as homework assignment?
SCE
SCE le 27 Fév 2024
A= V(5)
Simply write this!:)

Connectez-vous pour commenter.

 Réponse acceptée

Is this what you are looking for ?
MyVector=rand(100,1);
MyData=MyVector(5);

2 commentaires

I suspect this is a homework assignment.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by