The code "ExtractFiringThresholdsVelPos.m" analyses the neurons obtained from the 1st step regarding their firing thresholds. To run the code load the file 
"meshfittingSave.mat" into the workspace and change the savepath accordingly (line 4). The code plots the position and velocity tuning curve and their respective
firing thresholds. This data, together with the PVIndices, is also saved in an additional file called Savematrix.mat.

The code "ExtractFiringThresholdsVelPos_WithBoots.m" work in the same way, only it also runs the bootstrap analysis. The results for the position tuning curve will be saved
in a file called "SaveStructP.mat" and "SaveStructV.mat" for velocity. Both codes were run with Matlab R2015a.


Neuron ID for manual classification as 

Threshold-linear with saturation: 2,17,61,243,312,313,342,380,392,393,398,399,409,412,427,447,450,514,528,557,560,562,564,575,638,663,667,668,669,670,692,695,704,707,715,716,717,740,749,834

Threshold-linear: 3,6,10,16,18,22,23,38,39,48,78,79,80,81,84,97,233,234,237,238,248,261,264,320,377,379,382,401,408,410,415,416,417,418,429,518,537,561,574,606,619,632,633,637,648,675,677,689,691,693,706,712,713,718,722,725,726,729,741,742

Ambiguous: 4,13,14,15,19,27,40,47,67,85,94,102,253,256,353,381,400,407,426,508,515,516,525,533,536,544,558,573,613,631,654,679,705,711,724,727,728,753,754