Skip to content

Commit 54af72a

Browse files
IanIan
Ian
authored and
Ian
committed
small plx loading fix
1 parent 5bd9b28 commit 54af72a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

spikes.m

+10-8
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function spikes(action)
204204
if isfield(data,'pR'); pR = data.pR; end
205205
data=struct;
206206
data.zs=zs;
207-
if exist('pR','var'); data.pR = pR; else; data.pR=[]; end
207+
if exist('pR','var'); data.pR = pR; else data.pR=[]; end
208208
data.meta=meta;
209209
data.info=info;
210210
data.filetype=t;
@@ -360,10 +360,10 @@ function spikes(action)
360360
data.pR.parse;
361361
end
362362
end
363-
if isfield(data.pR.rE.tS,'name') && ~isempty(regexpi(data.pR.rE.tS.name,'two-figure-ground'));
364-
inputdlg({'Enter First Variable Position:','Enter Second Variable Position:'},...
365-
'Two Figure Trial Correction:',[1 20],{'1','1'});
366-
end
363+
% if isfield(data.pR.rE.tS,'name') && ~isempty(regexpi(data.pR.rE.tS.name,'two-figure-ground'));
364+
% inputdlg({'Enter First Variable Position:','Enter Second Variable Position:'},...
365+
% 'Two Figure Trial Correction:',[1 20],{'1','1'});
366+
% end
367367
data.zipload=false;
368368
data.filetype='plx';
369369
data.sourcepath = [pn fn];
@@ -491,9 +491,11 @@ function spikes(action)
491491
data.modtime=data.meta.modtime;
492492
tempfreq = [];
493493
for jj = 1:length(data.info)
494-
rx=regexp(data.info{jj},'Stim1:.+Drift.+Period:.+\((?<freq>\d.\d).+\)','names');
495-
if ~isempty(rx)
496-
tempfreq = [tempfreq str2num(rx.freq)];
494+
if size(data.info{jj},1) == 1
495+
rx=regexp(data.info{jj},'Stim1:.+Drift.+Period:.+\((?<freq>\d.\d).+\)','names');
496+
if ~isempty(rx)
497+
tempfreq = [tempfreq str2num(rx.freq)];
498+
end
497499
end
498500
end
499501
if isempty(tempfreq)

0 commit comments

Comments
 (0)