practice_test2_1

practice_test2_1 - y = polyval([12 0 0 0 0 0 0 0 0 0 0 0 0...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% Given the function f(x) = 12x^20 + 7x^2, plot on the same graph f(x) and f'(x), % for 102 equally spaced samples of x from -100 to 25 % x = linspace(-100, 25, 102);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y = polyval([12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0], x); dx = x(2)-x(1); df = diff(y)/dx; plot (y) hold on plot (df,'g')...
View Full Document

Ask a homework question - tutors are online