I wanto to convert a vector 1x45000 to a vector 1x36000 and a vector of 1x27000 to a vector 1x36000 How can I do it?

댓글 수: 2

doc resample
Roger Wohlwend
Roger Wohlwend 2014년 6월 5일
I don't understand the question. You want to convert a vector with 45'000 elements to one with 36'000 elements? What does that mean? I suppose you don't want to delete 9'000 elements?

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

 채택된 답변

Rafael Freire
Rafael Freire 2014년 6월 5일

2 개 추천

This is what I wanted...Thank you guys
a=resample(b, 45001,36001);

추가 답변 (1개)

David Sanchez
David Sanchez 2014년 6월 5일

0 개 추천

vect_45 = rand(1,45000); % your 1x45000 array
vect_36 = vect_45(:,1:36000);
vect_27 = rand(1,27000); % your 1x27000 array
vect_36_b = [vect_27 zeros(1,9000)]; % you have to add elements to fill the gaps between 27000 and 36000, I added zeros

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

질문:

2014년 6월 4일

답변:

2014년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by