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

조회 수: 64 (최근 30일)
Sean St Cyr
Sean St Cyr 2020년 6월 23일
댓글: SCE 2024년 2월 27일
Im trying to take the 5th value of a randomly generated row or column vector. How would I write the code for that?
  댓글 수: 2
Star Strider
Star Strider 2020년 6월 23일
See the documentation on Matrix Indexing for details.
Is this as homework assignment?
SCE
SCE 2024년 2월 27일
A= V(5)
Simply write this!:)

댓글을 달려면 로그인하십시오.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 6월 23일
Is this what you are looking for ?
MyVector=rand(100,1);
MyData=MyVector(5);
  댓글 수: 2
Star Strider
Star Strider 2020년 6월 23일
I suspect this is a homework assignment.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by