% Matlab diary from cs110a Feb 7 2005. % % This is what I typed in class. % % Type it into Matlab yourself to % reproduce the output I showed. f = inline( 'x^3 + sin(x) - 5') f(1) ezplot(f) ezplot(f,[-2 2]) ezplot(f,[0 2]) ezplot(f,[1 2]) f(1.5) ezplot(f,[1.5 2]) ezplot(f,[1.5 1.75]) f fprime = inline('3*x^2 + cos(x)') ezplot(f,[0 2]) x = 2 f(x) fprime(x) x = x - f(x)/fprime(x) x = x - f(x)/fprime(x) x = x - f(x)/fprime(x) x = x - f(x)/fprime(x) x = x - f(x)/fprime(x) x = x - f(x)/fprime(x)