You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hooke1.m
    path of file: ./repos/opt_matlab/第2章/例2.10
    
    the code of the file until where you have to start completion: function [xmin,minf]=hooke1(fun,x0,x_syms,d,alpha,esp)  %hooke直接搜索法，x0为初始值，以行输入,d为步长

    
function [xmin,minf]=hooke1(fun,x0,x_syms,d,alpha,esp)  %hooke直接搜索法，x0为初始值，以行输入,d为步长
if nargin==5
    esp=1e-8;
elseif nargin==4
    alpha=1.0;
    esp=1e-8;
elseif nargin==3
    d=1;
    alpha=1.0;
    esp=1e-8;
end