필터 지우기
필터 지우기

How can I modify vector length?

조회 수: 5 (최근 30일)
DenisK
DenisK 2018년 5월 12일
댓글: DenisK 2018년 5월 12일
I have several vectors to compare, however they all slightly differentiate by length. I know that first numbers of vectors are zeros. Can I cut those number to get vectors of same length? I don't want to pad vectors with zeros, because in this case I wouldn't be able to calculate an error between vectors?
Or may be there is a way to calculate error ratio between two vectors, even if they have different length?
  댓글 수: 4
Jan
Jan 2018년 5월 12일
Please post the data. If the inputs contain NaNs, the result must be NaN also.
DenisK
DenisK 2018년 5월 12일
The data is an mp3 file, so I cannot attache it here. Vectors that I built are result of few convolution methods, that I need to compare (linear, circular, overlap save and overlap add). I took linear convolution result as a reference vector.

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

채택된 답변

Jan
Jan 2018년 5월 12일
If cropping the zeros solves the problem, crop the zeros:
v = [0,0,1,2,3,4]
v = v(find(v, 1):length(v))

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by