Hi Glypton
I understand that you want to plot the maximum values of each row in the matrix, over a plot of the matrix itself.
Here is a code snippet for the same, applied on the matrix file you have attached.
plot(matrix);
maxVals = max(matrix, [], 2);
hold on
plot(maxVals, "r", "LineWidth",2);
hold off
This is the output plot generated:

If you wish to fit a smoother curve as an approximation for the data, you can use the smooth function.
plot(matrix);
maxVals = max(matrix, [], 2);
smoothMaxVals = smooth(double(maxVals));
hold on
plot(smoothMaxVals, "r", "LineWidth",2);
hold off
This is the output plot generated:

Hope it helps
Ishaan