% This is just a test-file to correctly call the routine steep.m disp('Test for the routine steep.m') % Define a starting point (Remark this needs to be a column vector) x0=[0.8;0] steep6(x0,@xyfunc,1,10^(-4),6); % The input in the routine: % - x0, the starting point % - xyfunc (open the file, you can see now the function) % - 1, means plot==1, hence we plot figures % - 10^(-4) only solve the problem untill the solution has 4 correct % digits % - 6, means that we perform at most 6 iteration steps. % NORMALLY THIS IS MUCH LARGER THAN 6, BUT OUR ROUTINE HAS SOME STEPS % WHICH WE STILL HAVE TO COMPLETE, HENCE IT WILL NOT STOP, THEREFORE WE % WILL LIMIT IT NOW TO 6, WHEN YOUR METHOD WORKS, YOU CAN MAKE IT MUCH LARGER.