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: readdat.m
    path of file: ./repos/EEGapp/EEGapp/custom_stuff/Chronux/chronux_2_12/dataio
    
    the code of the file until where you have to start completion: function [data,sampling]=readdat
%
% function for reading *.mat, *.wav and *.au files
% *.mat files have to contain variables data and sampling in order for the
% returns to work properly

    
function [data,sampling]=readdat
%
% function for reading *.mat, *.wav and *.au files
% *.mat files have to contain variables data and sampling in order for the
% returns to work properly
%
[fname,pname]=uigetfile('*.*');
strindex=findstr(fname,'.plx');
if ~isempty(strindex);
   error('This file format can be read with Plexon supplied routines in folder ReadingPLXandDDTfilesinMatlab');
end