match - Comparing/ Matching elements of 2 vectors by MATLAB -


i compare/match elements of 2 vector data, the goal select elements element-wise 2 vectors different not greater 3. output 2 new vector have same length , elements arranged in order. size of 2 vectors (before processed) arbitrary.

ex. = [11 38 49 84 96 117 157 176 200]; b = [10 28 37 48 84 157 175 200];

compare element abs(a(i) - b(j)) <= 3 output should a_new = [11 38 49 84 157 176 200] b_new = [10 37 48 84 157 175 200] can guide me how write matlab code problem? used 2 nested loop got stuck empty set fault. thank you.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -