I\'m doing video analysis.
The end result array I get is something like:
signal =
Columns 1 through 7
73960 73960 73960 73
If you want the maximum and minimum values just use:
[sig_min, idx_min] = min(signal);
[sig_max, idx_max] = max(signal);
But I couldnt understand exactly what you want… since my account is new, I cant comment on your question to try to understand it better.
— edit 1:
Ok, now I understand what you want. I don't know why you have this array with repetitive numbers, but supposing you don't want them, or, at least, that is better to remove them to find local maxima and minima, you should do:
sinal_norep = signal(find(diff(sinal)));
where signal_norep will be your new array containing only values that differs from the last one:

Now we can search for the index where occurs local maxima and minima on this array, by doing:
minimas_idx = find(signal_norep(2:end-1)signal_norep(1:end-2) & signal_norep(2:end-1)>signal_norep(3:end))+1;
And their values:
signal_maximas = signal_norep(maximas_idx);
signal_minimas = signal_norep(minimas_idx);
Thats it x)