concatenating certain columns of a (numeric) matrix. The id of columns of interest stored in a numeric array. Also some columns are selected more than once.
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a numeric matrix A. I want to generate matrix B (with the same size as A) from certain columns of matrix A. Columns of interest are specified in an array and some columns in B are repeated more than once.
댓글 수: 0
채택된 답변
KSSV
2016년 6월 6일
K = rand(10) ;
L = rand(10) ;
col = [1 3 7 10] ; % columns to be replaced
L(:,col) = K(:,col) ;
추가 답변 (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!