How to taking other element in nth column?
조회 수: 9 (최근 30일)
이전 댓글 표시
extract the variablefrom an 88x6 matrice ? Every other element in the fifth column How can I co
댓글 수: 0
답변 (1개)
KSSV
2017년 8월 31일
A = rand(88,6) ; % A random data matrix
% Extracting 4th column alternate element
B = A(1:2:end,4) ;
% Extracting fourth complete column
C = A(:,4) ;
Read about matrix indexing first: https://in.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!