How to fix it.

조회 수: 6 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2020년 10월 28일
댓글: Nisar Ahmed 2020년 10월 28일
wav dimentions are
wav = 5001*1
and I want to change it as wav = 5001*5
How I can reshape it?

채택된 답변

Steven Lord
Steven Lord 2020년 10월 28일
So you want to take 5001 values and generate 25005 (5001 times 5) values using those values. How do you want to generate the additional 20004 values?
Make duplicate copies?
x = (1:6).'
y = repmat(x, 1, 5)
Offset the copies by a certain amount? This approach uses implicit expansion; if you're using an older release you could use bsxfun.
x = (1:6).'
y = x + (0:10:40)
Pad with 0 values or with random data?
x = (1:6).'
y = [x, zeros(size(x, 1), 5)]
z = [x, rand(size(x, 1), 5)]
w = [x, randi([7 11], size(x, 1), 5)]
Something else? If so, please explain in detail how you want to generate the additional values.
  댓글 수: 3
Elijah McNeil
Elijah McNeil 2020년 10월 28일
His code does that, Just write this.
x = (1:5000).';
wav = repmat(x, 1, 5).
Nisar Ahmed
Nisar Ahmed 2020년 10월 28일
Elijah McNeil, thanks dear, Now it is working

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

추가 답변 (1개)

Elijah McNeil
Elijah McNeil 2020년 10월 28일
편집: Elijah McNeil 2020년 10월 28일
This should work
wav = 5001*1
wav = wav*5
  댓글 수: 5
Elijah McNeil
Elijah McNeil 2020년 10월 28일
Wait 5000 rows and 1 column?
Nisar Ahmed
Nisar Ahmed 2020년 10월 28일
5000 rows and 5 columns, each column is duplicate of other.

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

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by