Problem with opening an abf file using abfload

12 views (last 30 days)
Hello,
I'm new to Matlab and Im trying to open an abf file using (https://fr.mathworks.com/matlabcentral/fileexchange/6190-abfload )
I've downloaded the code and called the function this way:
fn="20505002.abf";
[d,si]=abfload(fn,'start',0,'stop','e');
After RUN I get this Errors:
"Error using abfload (line 228)
invalid number format
Error in Try1 (line 5)
[d,si]=abfload(fn,'start',0,'stop','e');"
lines 217-228 in abfload is:
% tell me where the data start
blockSz=512;
switch nDataFormat
case 0
dataSz=2; % bytes/point
precision='int16';
case 1
dataSz=4; % bytes/point
precision='float32';
otherwise
fclose(fid);
error('invalid number format');
end;
Can you tell me what I was doing wrong?
Thanks,
Neta.

Answers (1)

Anmol Dhiman
Anmol Dhiman on 2 Jul 2020
Hi Neha,
Use disp(nDataFormat) before the switch case to see the output. As it is not 0 or 1, you are getting error. Check for corresponding DataFormat.
Regards,
Anmol Dhiman

Categories

Find more on Electrophysiology in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!