Detect missing value between two vectors that are similar, but not the same!
3 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone,
If I got two vectors (A and B) like you can see downbelow:
if true
% code
A = [26 3553 7064 10558 14048 17568]
B = [3503 7002 10481 13927 17544]
end
How can I find the correct missing index and replace add the value that is suppose to near the opposite value?
In this case I would like to change B, so it got a result like this:
if true
B_new = [ 8 3503 7002 10481 13927 17544]
end
B_new(1), doesn't have to be 8, but a number that is close to A(1) and follow the pattern of change in B.
Thank you in advance :)
1 件のコメント
dpb
2018 年 7 月 19 日
Perhaps not terribly efficient but what about pairing by minimizing distances pdist2 and then your left with "odd man out" for the one with the largest difference. That would presume there my not be two very similar values in the same series.
回答 (0 件)
参考
カテゴリ
Help Center および 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!