0001 function [data,sampling]=readdat
0002
0003
0004
0005
0006
0007 [fname,pname]=uigetfile('*.*');
0008 strindex=findstr(fname,'.plx');
0009 if ~isempty(strindex);
0010 error('This file format can be read with Plexon supplied routines in folder ReadingPLXandDDTfilesinMatlab');
0011 end;
0012 strindex=findstr(fname,'.ddt');
0013 if ~isempty(strindex);
0014 error('This file format can be read with Plexon supplied routines in folder ReadingPLXandDDTfilesinMatlab');
0015 end;
0016 strindex=findstr(fname,'.nex');
0017 if ~isempty(strindex);
0018 error('This file format can be read with Plexon supplied routines in folder HowToReadNexFilesInMatlab');
0019 end;
0020 strindex=findstr(fname,'.mat');
0021 if ~isempty(strindex);
0022 eval(['load ' pname fname]);
0023 end;
0024 strindex=findstr(fname,'.wav');
0025 if ~isempty(strindex);
0026 filename=[pname fname];
0027 [data,sampling]=wavread(filename);
0028 end;
0029 strindex=findstr(fname,'.au');
0030 if ~isempty(strindex);
0031 filename=[pname fname];
0032 [data,sampling]=auread(filename);
0033 end;