Equation notation

100 Views Asked by At

A vector $x$ has $n$ elements and the $i$th element is refered by $x_i$. I want to know the position of the element having maximum value provided $max(x)$>$A$ and different between 1st maximum and 2nd maximum greater than $B$. In case, any of these does not hold $true$ then return $0$.

$f = \left\{\begin{matrix} i & |x_i=max(x),x_i>A,max_1(x)-max_2(x)>B\\ 0 & otherwise \end{matrix}\right. $

I'm not sure about $max_1$ (first maximum) and $max_2$ (second maximum). I mean, is writing $max_1$ or $max_2$ correct in standard equation notation? If not, is there another way to write the same ?

(I'm need this to write in a journal paper so I'm looking for a standard form)

Thanks in advance.

2

There are 2 best solutions below

0
On BEST ANSWER

As far as I know your notations $max(x)$, $max_1(x)$ and $max_2(x)$ are not standard but you can write a definition as: $$ max_1(x)= x_j \ge x_k \forall x_k>B $$ $$ max_2(x)= x_j > x_k \forall x_k>max_1(x) $$ $$ max(x)= x_i \ge x_k \forall x_k>A $$

1
On

I'm not sure I get what you want here...

But you could have a function returning you the $max_1$ as you call it, and then, give it the vector $x$ to which you retire $max_1$, that would give you your $max_2$ of the vector $x$.