필터 지우기
필터 지우기

dataset expansion keeping same values

조회 수: 2 (최근 30일)
Dave Griffin
Dave Griffin 2017년 7월 18일
편집: alice 2017년 7월 18일
Is it possible to extend a data in the same fashion as c=1 2 3 4 5 to c1 = 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 but on a much larger scale from an array of 144 to an array of 1440

채택된 답변

alice
alice 2017년 7월 18일
편집: alice 2017년 7월 18일
To transform myArray by repeating its elements nRepeat times:
myArray = 100*rand(1,144); % fake data
nRepeat = 10;
myArrayRepeat = reshape(ones(nRepeat,1)*myArray,1,nRepeat*length(myArray));
or since Matlab R2015a:
myArrayRepeat = repelem(myArray,nRepeat);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by