From: Rorie Thomson on
Hi,
I need this for my report due in the morning, so a quick response would be great.
I have a 'for' loop running 7 times, running through the seven values in the array DH=[10 15 20 25 30 35 40].

I am using ODE45 and a long file so i wont post it all. Basically my results are returned in a matrix named y.

I want to plot the max value of the first row of my returned matrix y against the value of DH which was used to find it.

in other words at the end of my loop, i want ONE plot with ALL values of DH on the xaxis, and corresponding values (max(abs(y(:,1)))) on the y axis.

The current set up is below, but this gives me a different graph for each of the seven loops and it does not look acurate. I want a ONE result for each value of DH and then plot them to give me a line in my plot made of seven data points.

for i=1:7;
.....DH(i)....
plot(DH(i),(max(abs(y(:,1)))),'b')
hold on
....
end