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

49 Ansichten (letzte 30 Tage)
Sean St Cyr
Sean St Cyr am 23 Jun. 2020
Kommentiert: SCE am 27 Feb. 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 Kommentare
Star Strider
Star Strider am 23 Jun. 2020
See the documentation on Matrix Indexing for details.
Is this as homework assignment?
SCE
SCE am 27 Feb. 2024
A= V(5)
Simply write this!:)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by