Problem with opening an abf file using abfload

24 Ansichten (letzte 30 Tage)
idan fishel
idan fishel am 20 Mai 2020
Beantwortet: Anmol Dhiman am 2 Jul. 2020
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.

Antworten (1)

Anmol Dhiman
Anmol Dhiman am 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

Kategorien

Mehr zu Electrophysiology finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by