Modify matrix, row vector

조회 수: 6 (최근 30일)
Anh Dao
Anh Dao 2017년 12월 7일
댓글: Anh Dao 2017년 12월 7일
I have 3 row vectors, which is defined as y1, y2 and y3. Their dimension is 1*166500. For y1, I want the first value to be zero, for y2, I want first 500 numbers to be zero and for y3, I want first 501 values to be zero, how do I do this? Thanks you!
  댓글 수: 3
Anh Dao
Anh Dao 2017년 12월 7일
편집: Anh Dao 2017년 12월 7일
I mean the index of y2 whose elements I want to set to 0, like for first 500 number within y, I want it to be zero. Thanks you!
Anh Dao
Anh Dao 2017년 12월 7일
I'm such an idiot, I figured it out, it's y2(1, 1:500) = 0 , thanks you!

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

답변 (1개)

Jos (10584)
Jos (10584) 2017년 12월 7일
  댓글 수: 1
Anh Dao
Anh Dao 2017년 12월 7일
I read and this had nothing to do with what i asked

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by