Sfoglia il codice sorgente

Elimina 'Script task/MoBi_linearize_force.m'

Giacomo Guidali 1 anno fa
parent
commit
c7c13a37d0
1 ha cambiato i file con 0 aggiunte e 27 eliminazioni
  1. 0 27
      Script task/MoBi_linearize_force.m

+ 0 - 27
Script task/MoBi_linearize_force.m

@@ -1,27 +0,0 @@
-function [force_lin, idx]= MoBi_linearize_force(force_from_arduino, linearize, funz)
-
-% linearizie should be a linear function from 0 to a maximum
-%linearize = linspace(0, max_force, force_steps);
-
-% funz should be a non linear function
-
-% funz and linearize should have the same force_steps
-
-if isempty(force_from_arduino) % it might be that at the beginning of the trial weird readings are performed
-    
-    idx = 0;
-else
-    
-idx = find(force_from_arduino<=funz, 1, 'first');
-
-end
-
-% in case force_from_arduino is freater than any value from funz, idx =
-% length(funz) --> so whatever higehr value, the output is always the last
-% idx of funz
-if isempty(idx)
-   idx = length(funz) 
-end
-force_lin = linearize(idx);
-
-end