How can I modify vector length?
4 次查看(过去 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!