https://github.com/PerezOrtegaJ/Neural_Ensemble_Analysis
Raw File
Tip revision: 9d37fd031dfbdb4eb69faa449d0a6416267a7d4f authored by Jesús Pérez on 28 July 2020, 20:36:58 UTC
Update README.md
Tip revision: 9d37fd0
Get_Consecutive_Vector_Indices.m
function vectorID = Get_Consecutive_Vector_Indices(samples,width)
% Get consecutive indices of specific width to create neuronal vectors
%
%       vectorID = Get_Consecutive_Vector_Indices(samples,width)
%
% By Jesus Perez-Ortega, Nov 2019

n = ceil(samples/width);
vectorID = zeros(samples,1);

for i = 1:n
    ini = (i-1)*width+1;
    fin = i*width;
    if fin>samples
        fin = samples;
    end
    vectorID(ini:fin) = i;
end
back to top