I have a matrix with 360 elements and I need to expand it to 3600 elements with the same mean and standard deviation.

 채택된 답변

Wayne King
Wayne King 2014년 1월 7일
편집: Wayne King 2014년 1월 7일

0 개 추천

You don't say the size of your matrix, you just tell us the number of elements. You also do not give us any information about the distribution -- is it Gaussian?
Xstart = randn(360,1);
meanX = mean(Xstart);
stdX = std(Xstart);
Xend = [Xstart ; stdX*randn(3600-360,1)+meanX];

댓글 수: 2

Ahmed Hussein
Ahmed Hussein 2014년 1월 7일
Thank you very much
Of course repmat() also meets the requirements (or lack thereof).
vector3600 = repmat(vector360, [1, 10]);

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Ahmed Hussein
Ahmed Hussein 2014년 1월 7일

0 개 추천

The matrix is [1,360] and the distribution is Gaussian
Thank you very much
Ahmed Hussein
Ahmed Hussein 2014년 1월 7일

0 개 추천

Thank you very much

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2014년 1월 7일

댓글:

2014년 1월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by