Effacer les filtres
Effacer les filtres

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

24 vues (au cours des 30 derniers jours)
Sean St Cyr
Sean St Cyr le 23 Juin 2020
Commenté : SCE le 27 Fév 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 commentaires
Star Strider
Star Strider le 23 Juin 2020
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

Fangjun Jiang
Fangjun Jiang le 23 Juin 2020
Is this what you are looking for ?
MyVector=rand(100,1);
MyData=MyVector(5);
  2 commentaires
Star Strider
Star Strider le 23 Juin 2020
I suspect this is a homework assignment.
David Randolph
David Randolph le 13 Mai 2022

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by