How can I modify vector length?
조회 수: 5 (최근 30일)
이전 댓글 표시
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
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!