function s=readl16(name,beg,length); % Syntax: s=readl16(name,beg,length) % % reading of *.l16 files (binary, shorts) to Matlab. No default path. % no default extension (everything has to be in 'name'). % the function reads the samples from beg. % if length==inf, the file is read till the end. % ---------------------------------------------------------------- % Fonc. pour lire les fichiers *.l16 (binaires, shorts) en Matlab. % Pas de chemin par default ! % Pas d'extension par default ! % La fonction lit longeur mots a partir de debut % si longeur==inf, le fichier est lit jusqu'a la fin fpsig=fopen(name,'r'); %s=fread(fpsig,beg,'short'); % partie a sauter s=fread(fpsig,length,'short',beg); fclose(fpsig); s=s';