MATLAB Answers

0

Comparing two vectors getting results in the new one

Asked by Adam Kepinski on 17 Nov 2017
Latest activity Commented on by Adam Kepinski on 17 Nov 2017
Hi,
I want to compare two arrays (10000x1) and get a third one with values either 1 (V1>V2) or 0 (V1<V2). Anybody could help?
Thanks

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by Birdman
on 17 Nov 2017
 Accepted Answer

c=a>b
This will return 0(for a<b) and 1(for a>b), 10000x1 logical array.

  0 Comments

Sign in to comment.


Answer by Mischa Kim
on 17 Nov 2017

V3 = V1 > V2

  1 Comment

Sign in to comment.