필터 지우기
필터 지우기

How to get value in a column or row

조회 수: 1 (최근 30일)
Tran Hoa
Tran Hoa 2018년 7월 30일
댓글: Tran Hoa 2018년 7월 30일
Hi member, I have a matrix Ex a=[1 2 3 5 6 8], and I only want to take b= a(1), a(2) and a(4) : 1,2,5 in stead of the whole column. Can you instruct me to do it. Thank you.

채택된 답변

KSSV
KSSV 2018년 7월 30일
a=[1 2 3 5 6 8] ;
idx = [1 2 4] ;
b = a(idx) ;
  댓글 수: 1
Tran Hoa
Tran Hoa 2018년 7월 30일
Thank you. It is very useful

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by