hello,
I want read and plot ECG signal downloaded from MIT data base (.dat) i use the following codes:
clear allclcclose all[filename, pathname] = uigetfile('*.dat', 'Open file .dat');% only image Bitmap
if isequal(filename, 0) || isequal(pathname, 0) disp('File input canceled.'); ECG_Data = []; elsefid=fopen(filename,'r')end;time=10;f=fread(fid)Orig_Sig=f(1:length(f));%plot(Orig_Sig(1:2:length(f)))
plot(Orig_Sig(1:2:4000))
i get the following error:
Error using fread Invalid file identifier. Use fopen to generate a valid file identifier.
how i can read these data?
thank in advance
Best Answer