Problems are from Sauer's book unless problem number starts with "X".
function test_fzero() format long approx = [-1,1.09] options.abstol = 1.0e-6 fzero(@myfunc,approx,options) endYou need to write your own "myfunc". The general syntax for a function of a single variable with a single return argument is
function out = foo( in ) out = in*whatever + blah; end(b) [1 point] If fzero does converge, how many function evaluations does fzero use in order to get an absolute error of less than 10-15.
$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Pentium(R) 4 CPU 2.93GHz stepping : 1 cpu MHz : 2934.721 cache size : 1024 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl tm2 cid xtprbogomips : 5871.31(a) [2 points] On this machine, about how big of a matrix could you do Gaussian Elimination on in 1 minute?
$ cat /proc/meminfo MemTotal: 2571260 kB MemFree: 1653428 kB Buffers: 45808 kB Cached: 485340 kBThis problem moved to HW 4.