MATLAB Answers

Conditional statement with vectors

2 views (last 30 days)
Tchilabalo
Tchilabalo on 18 May 2019
Commented: Tchilabalo on 19 May 2019
I have two vectors A (100 numbers) and B (500 numbers). For each element of A, I want to find the index (j) of element B such that: Bj-1 Ai ˂ Bj
Thanks in advance.

  0 Comments

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 18 May 2019
help discretize

  1 Comment

Tchilabalo
Tchilabalo on 19 May 2019
That works. Thanks very much.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by