This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % x is between 0 and 2 xmin = 0; xmax = 2; intv = .01; x = xmin : intv : xmax; %find function at each x point func = 3*x-3; %x value that makes function closest to zero is solution [value index] = min(abs(func)); fprintf('\nx= %.2f\n\n', x(index));...
View Full Document
This note was uploaded on 08/06/2010 for the course ENGR 3 taught by Professor Ben-yaakov during the Summer '08 term at UCSB.
- Summer '08