Hey, i have a small problem with a program i am writing in an mandatory task.
I am suppose to find the maximum value of one elemt minus the other elemt in a row vector, and do this for each element.
so far i have done this:
a = [2 8 9 5 4 9 7 6];
for j = 2:8
c = max(a(j-1) , a(j));
disp = c
What i further wish, is to make a new vector consisting of each of these maximums elements. How would i do that?