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: readnamdbin.m
    path of file: ./repos/mdtoolbox/mdtoolbox
    
    the code of the file until where you have to start completion: function [crd, nAtom] = readnamdbin(filename, nAtomLimit)
%% readnamdbin
% read namd restart (namdbin) file
%
%% Syntax
%# crd = writenamdbin(filename);
%# [crd, natom] = writenamdbin(filename);
%# [crd, natom] = writenamdbin(filename, natomlimit);
%

    
function [crd, nAtom] = readnamdbin(filename, nAtomLimit)
%% readnamdbin
% read namd restart (namdbin) file
%
%% Syntax
%# crd = writenamdbin(filename);
%# [crd, natom] = writenamdbin(filename);
%# [crd, natom] = writenamdbin(filename, natomlimit);
%
%% Description
% read namd restart (namdbin) file
%
% * filename   - filename of namd restart (namdbin) file
% * crd        - coordinates or velocities [double 1 x natom3]
% * natomlimit - maximum number of atoms to be read [integer]
% * natom      - number of atoms [integer]
%
%
%% Example
%# crd = readnamdbin('run.restart.coor');
%# vel = readnamdbin('run.restart.vel');
%# vel = vel * 20.45482706 % convert to Angstrom/ps
%
%% See also
% writenamdbin
%

if ~exist('nAtomLimit', 'var')
  nAtomLimit = 10^8;
end