필터 지우기
필터 지우기

Repeat values in a matrix

조회 수: 1 (최근 30일)
Athira Surendran
Athira Surendran 2017년 4월 4일
편집: KSSV 2017년 4월 4일
I want to convert a column matrix of size 10x1 to 10x10000 matrix in which all columns in the converted matrix are same as the values in the initial column matrix,
For example, x=[a;b;c], if i convert this to a 3x3 matrix, it should be [a a a; b b b; c c c]

채택된 답변

KSSV
KSSV 2017년 4월 4일
편집: KSSV 2017년 4월 4일
doc repmat
x = [1 2 3] ;
iwant = repmat(x,3,1)

추가 답변 (0개)

카테고리

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