Matlab Defining Function Inside Script