echo on).
Make sure that all output is clearly labeled so that it is clear what each number means and by what line in the .m file it was generated.
[X,Y]=meshgrid(-5:.1:5,-4:.1:4); contour(X,Y,cos(X.^2)-sin(X.*Y)-.5,[0 0]) % use .*,./,.^ !
You can superimpose several contours by using hold on after the
first contour command.
f.m and
J.m for the function and the Jacobian. The file f.m
should look like this:
function w=f(v) w = zeros(19,1); w(1) = ... for i=2:18 w(i) = ... end w(19) = ...
The file J.m should look like this:
function a=J(v) a = sparse(19,19); % 19x19 zero matrix as sparse structure ... % row 1 for j=2:18 % rows 2,...,18 a(j,j-1) = ... a(j,j) = ... a(j,j+1) = ... end ... % row 19
Use plot(0:.05:1,[0;v;0]) to plot the angle of the rod vs. the
arclength.