0
$\begingroup$

Could you help me with this theoretical question.

The purpose is to design a discrete-time system. What it does is, it finds the maximum value in a one-dimensional sequence whose elements consist only of "non-negative" real numbers and contains only a single global maximum with no local maxima.

Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ so you have a set of positive numbers and you need to write an algorithm to find the max in that set. $\endgroup$ – spet Oct 25 '18 at 17:52
0
$\begingroup$

Since you have defined your signal $x[n]$ to be a set of non-negative numbers with a single global maxima, the algorithm to find the maximum is quite simple.

compute the first (causal , backward) difference $$y[n] = x[n] - x[n-1]$$

Then look for the sign change of $y[n]$; i.e., at the extreme point you will have the sign of $y[n]$ changing from positive to negative, assuming you had a single global maxima.

$$z[n] = \text{sign_change_detector} \{ y[n] \} $$

Don't forget to check the end points as well. As they are also the candidates to be maximum in addition to those critical point(s).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.