Problem with opening an abf file using abfload

8 次查看(过去 30 天)
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.

回答(1 个)

Anmol Dhiman
Anmol Dhiman 2020-7-2
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

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by