Finding intersecting rows in column vectors of varying length?
Show older comments
Hello, I have 2 column vectors of different lengths and I would like to find instances in each vector with the same value. For example if vector 1 is:
v1x=[1:0.1:10];
v1y=[20:2:200];
And vector 2 is:
v2x=[1;6.5;9;10;10;1;2.3];
v2y=[20;62;26;30;200;96;200];
I would like to create a 3rd column vector with each “intersecting” instance such that:
v1x==v2x and v1y==v2y.
This should return for the example above, row =1 ,where
v1x=1=v2x and v1y=20=v2y
and
row =5, where v1x=10=v2x and v1y=200=v2y.
Thanks
Gareth
Accepted Answer
More Answers (0)
Categories
Find more on Debugging and Improving Code in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!