1> edit bi.m 2> f = inline(° error: invalid character `°' (ASCII 176) near line 2, column 13 parse error: syntax error >>> f = inline(° ^ 2> f = inline('x.^2-2') f = f(x) = x.^2-2 3> bi(f,1,2) 4> bi(f,1,2) ans = 1.4142 5> format long 6> bi(f,1,2) ans = 1.41421356237309 7> sqrt(2) ans = 1.41421356237310 8> eval(urlread('http://www.dm.unibo.it/~achilles/calc/Programmi_CS4a/bisection.m')); 9> [zero, reiduo, niter] = bisection(f,1,2, 1.e-300,100) Il metodo di bisezione si e' arrestato senza soddisfare la tolleranza richiesta avendo raggiunto il numero massimo di iterazioni zero = 1.41421356237309 reiduo = -4.44089209850063e-016 niter = 100 10> fun=inline('(x-1).^111'); bisection(fun,0.3,2,1.e-12,100) error: A(I) = X: X must have the same size as I error: called from: error: bisection at line 46, column 13 10> bi(fun,0.3,2) ans = 1.00058593750000 11> 'Auf Wiedersehen' ans = Auf Wiedersehen 12> quit