I have the Vector x that I want to find the Max or Min such as:
x = [ 21 19 20 17 16 17 18 16 15 13 15 16]
min(concave up) = [19 16 13]
Max(concave down) = [20 18 ]
This is what I have been trying.
I do not know if their is a fuction already in MatLab, but I would like to do it using a script.
Thank you in advance.
y = [1 2 3 4 5 6 7 8 9 10 11 12];x = [21 19 20 17 16 17 18 16 15 13 15 16];s = 1;% this to get the Min
for i = 2:size(x,2)-1 if x(i-1)< x(i) < x(i+1) z(S)= x(i); S = S + 1; end end
Best Answer