You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jorrit, thanks for your extremely useful work on this package. I've encountered an error that pops up occasionally but it seems dependent on the state of the random number generator (and I have not yet had the time to really hunt down when it is triggered).
I did a temporary fix (below) but you likely have a better way to handle this
thanks again for this well-motivated and user-friendly package!
%Was throwing "Error using vertcat Dimensions of arrays being
%concatenated are not consistent" --not currently reproducible
Thank you for your bug report. That's very curious! On line 6 it pre-allocates vecSpikeT as vecSpikeT = nan(numel(vecSpikeTimes),1);
So it shouldn't be possible for the vector ever be larger in dimension 2 than 1, unless the number of spikes is 0, in which case vecSpikeT is [0 x 1]. But even that case, this line shouldn't throw an error. Could you let me know if you ever figure out what's happening here?
At least one way to fix it in fewer lines is changing it to:
vecSpikeT = [0;sort(vecSpikeT(:),'ascend');dblUseMaxDur];
I've changed this now, but honestly - this bug shouldn't be possbible... If anyone from the future reads this and figures it out: please let me know!
Dear Jorrit, thank you! I will let you know the results when I have some time to dig into it a bit more; I agree it should not be possible. I am using 2022a and I realize now that I never encounted this problem with 2018b.
Hi Jorrit, thanks for your extremely useful work on this package. I've encountered an error that pops up occasionally but it seems dependent on the state of the random number generator (and I have not yet had the time to really hunt down when it is triggered).
I did a temporary fix (below) but you likely have a better way to handle this
thanks again for this well-motivated and user-friendly package!
%Was throwing "Error using vertcat Dimensions of arrays being
%concatenated are not consistent" --not currently reproducible
%original:
%vecSpikeT = [0;sort(vecSpikeT,'ascend');dblUseMaxDur];
%RAM's fix 12.05.2022
sorted_vecSpikeT=sort(vecSpikeT,'ascend');
if size(sorted_vecSpikeT,2)>size(sorted_vecSpikeT,1)
disp 'flip it'
sorted_vecSpikeT=sorted_vecSpikeT';
end
vecSpikeT = [0;sorted_vecSpikeT;dblUseMaxDur];
The text was updated successfully, but these errors were encountered: