02_roots_and_optimization
Repository for homework 2
Question 2 '''matlab cat_cable = @(T) -35+T/10.cosh(10./T30)+30-T/10; [root,fx,ea,iter]=falsepos(cat_cable,900,910,0.00001) ''' '''matlab cat_cable = @(T) -35+T/10.cosh(10./T30)+30-T/10; [root,fx,ea,iter]=bisect(cat_cable,908,909,0.00001) ''' '''matlab cat_cable = @(T) -35+T/10.cosh(10./T30)+30-T/10; [root,ea,iter]=mod_secant(cat_cable,900,910,0.00001) '''
'''matlab
solver | initial guess(es) | ea | number of iterations |
---|---|---|---|
falsepos | 900, 910 | 0.00001 | 4 |
mod_secant | 900, 910 | 0.00001 | 50 |
bisect | 900, 910 | 0.00001 | 17 |
''' |