Hi,
I have a vector x and a vector y with both vectors having 10 elements and I have a function which uses a for loop to give a value to a variable e with each respective value of y and x. The for loop works as such;
for i=1:length(x)
e=y(i)-(m*x(i)+b)
end
and I want to display only the max value of e in the command window and the respective x and y elements that correspond to it. How would I do this?
Best Answer