function y=fx(x) y=x.^3+4*x.^2-10; endfunction % The part above is typed in a separate function file with the same name i.e. fx.m % No need for the word 'endfunction' in the function file. % The part below is performed at the command line separately root=fzero(@fx,1.6) or root=fzero('fx',1.6)