How to extract a value from a Row or Column vector?
60 views (last 30 days)
Show older comments
Sean St Cyr
on 23 Jun 2020
Commented: David Randolph
on 13 May 2022
Im trying to take the 5th value of a randomly generated row or column vector. How would I write the code for that?
Accepted Answer
Fangjun Jiang
on 23 Jun 2020
Is this what you are looking for ?
MyVector=rand(100,1);
MyData=MyVector(5);
2 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!