From 9fb0406fc02897161eedeffdd04d27f598534ecd Mon Sep 17 00:00:00 2001 From: iampritishpatil Date: Sun, 29 Oct 2017 01:57:38 +0300 Subject: [PATCH] Extract the comments part of the .abf file. the comment part is the one between .pro and IN . This change tries to extract it --- abfload.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/abfload.m b/abfload.m index 657a0c9..7c7961d 100644 --- a/abfload.m +++ b/abfload.m @@ -288,6 +288,9 @@ % - find '.pro' as this is the file extension of protocol files tmpIx2=strfind(lower(char(BigString)'),'.pro'); % - extract everything in between and place in field of header struct h + tmpIx3=strfind((char(BigString)'),'IN'); + h.comment1=char(BigString(tmpIx2(1)+4:tmpIx3(1)-1))'; + if ~isempty(tmpIx1) && ~isempty(tmpIx2) h.protocolName=char(BigString(tmpIx1:tmpIx2(1)+3))'; else @@ -718,7 +721,7 @@ tmp=1e-6*h.lActualAcqLength*h.fADCSampleInterval; if verbose disp(['total length of recording: ' num2str(tmp,'%5.1f') ' s ~ ' num2str(tmp/60,'%3.0f') ' min']); - disp(['sampling interval: ' num2str(h.si,'%5.0f') ' µs']); + disp(['sampling interval: ' num2str(h.si,'%5.0f') ' µs']); % 8 bytes per data point expressed in Mb disp(['memory requirement for complete upload in matlab: '... num2str(round(8*h.lActualAcqLength/2^20)) ' MB']); @@ -1527,4 +1530,4 @@ function pvpmod(x) % MEMSET_CTOR; % STATIC_ASSERT( sizeof( ABF_UserListInfo ) == 64 ); % } -% };*/= \ No newline at end of file +% };*/=