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: mygetnumber.m
    path of file: ./repos/segment-open/source
    
    the code of the file until where you have to start completion: function [z,ok] = mygetnumber(promptstri,titlestri,default,minval,maxval)
%Input dialog function that get a scalar value. 
%Syntax
%  MYGETNUMBER(STRI,DEFAULT,MIN,MAX)
%
%Where:
% - PROMPTSTRI prompt for dialog.
% - TITLESTRI title of dialog box.
% - DEFAULT is default value.
% - <MIN>, optional minimal value.
% - <MAX>, optional maximal value.

%Einar Heiberg


    
function [z,ok] = mygetnumber(promptstri,titlestri,default,minval,maxval)
%Input dialog function that get a scalar value. 
%Syntax
%  MYGETNUMBER(STRI,DEFAULT,MIN,MAX)
%
%Where:
% - PROMPTSTRI prompt for dialog.
% - TITLESTRI title of dialog box.
% - DEFAULT is default value.
% - <MIN>, optional minimal value.
% - <MAX>, optional maximal value.

%Einar Heiberg

global DATA

if nargin<3
  error('Expected at least three input arguments (prompt,title,default).');
end