필터 지우기
필터 지우기

how to construct the matrix of size 10x1000

조회 수: 2 (최근 30일)
asram eluru
asram eluru 2014년 3월 26일
편집: Mischa Kim 2014년 3월 26일
meshgrid(1:100,1:10) is giving 10x1000 matrix and values are from 1 to 1000 but I want the matrix of 10x1000 and in each column values are between 1 to 10 only.please give me the camand

답변 (1개)

Mischa Kim
Mischa Kim 2014년 3월 26일
편집: Mischa Kim 2014년 3월 26일
Asram, by 10x1000 do you mean 10 columns, 1000 rows?
mymat = ones(1000,1)*(1:10)
or rather 10 rows, 1000 columns, where the sequence from 1 to 10 is repeated 100 times?
mymat = repmat(ones(10,1)*(1:10),1,100)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by