How can I modify vector length?
显示 更早的评论
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
How do you defined an "error" ratio of vectors, when they have a different length? Why does zero padding not help, but zero cropping does? And if zero cropping does, why don't you do it?
Note that it is hard to suggest a solution, which matches your needs exactly, because the readers cannot guess, what "I have several vectors" mean. Do you mean 20 vectors store in a cell array, or 20'000 vectors in different variables?
DenisK
2018-5-12
Jan
2018-5-12
Please post the data. If the inputs contain NaNs, the result must be NaN also.
DenisK
2018-5-12
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!