How to express MATLAB indexing in math notation?

152 Views Asked by At

I am currently writing a paper concerning discrete arrays.

Given the following MATALB statement

v_1 = [1 2 3  4 5  6  7  8]; 
v_2 = [0 0 0 -3 0  0 -1 -5];
threshold = 5;

Z = find(v_1(v_2 < 0)> threshold)

meaning "let Z be the indices of all elements in v_1 where v_2 is less than zero, which are greater then a given threshold,

how can this be expressed in standard math notation?

1

There are 1 best solutions below

1
On BEST ANSWER

Something like $Z = \{j : v_2(j) < 0 \textrm{ and } v_1(j) > \textrm{threshold}\}$, if I'm understanding the statement correctly. (so in the example, $Z$ should be $\{7,8\}$, right?)