164 exDrive = mu(2)*this.
RR/10;
166 if rte <= exDrive*1.001
170 Tfac = 90*(1./P)^(log(this.
RT)/log(this.
RP));
173 finst = this.
pende*(exDrive-rte)+this.
fmin;
174 finst = min(finst, this.
fmax);
178 istprec = this.r.rand/finst;
182 while(istatt+0.02 < T/1000)
186 var_jitter = this.
sd_ISI*this.r.randn*0;
189 istatt = istprec+(1+var_jitter)/finst;
191 if(istatt < istprec+0.02)
192 istatt = istprec+0.02;
194 firing(round(istatt*1000)) = 1;
195 Ti_ISI = Tfac/(istatt-istprec)/1000;
200 gain(
k) = (1-exp(-2*Ti_ISI^3))/Ti_ISI/((1-exp(-2*0.4^3))/0.4);
207 hlp = [0:round(this.lengthWin/1000*this.
fsamp)]/this.
fsamp/(Tfac/1000);
208 winCoeff = P.*(hlp.*exp(1-hlp));
209 winCoeff = [0 winCoeff(winCoeff>1.e-4)];
211 spikes = find(firing==1);
212 for i=1:size(spikes,2)
213 if(spikes(i)+size(winCoeff,2) <= length(forces))
214 idx = spikes(i) + (1:size(winCoeff,2));
215 forces(idx) = forces(idx)+gain(i)*winCoeff;
220 forces = forces(1:end-this.lengthWin);
225 #if 0 //mtoc++: 'set.Seed'
226 function
Seed(value) {
227 this.r= RandStream(
" mt19937ar ",
" Seed ",value);
235 #if 0 //mtoc++: 'get.Seed'
236 function value =
Seed() {
246 f = models.motorunit.Fuglevand;
247 [x,y] = meshgrid(0:.05:1,0:.4:10);
249 force = zeros(1,numel(x));
251 fmu = f.getForces(p(:,
k));
254 force =
reshape(force,size(x,1),[]);
255 surf(x,y,force,
" FaceColor ",
" interp ",
" EdgeColor ",
" interp ");
RR
range of recruitment threshold values
function forces = getForces(colvec< double > mu, T)
lengthWin
duration of a single twitch in [ms]
fsamp
sampling rate [samples / s]
static function test_ForceResponse()
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
Fuglevand()
Defines the frequency change will know how to increase the level of the contraction frequency becomes...
Matlab's base handle class (documentation generation substitute)
RT
range of contraction times RT
RP
range of twitch forces RP
len
length of stimulation in [s]
sd_ISI
Standard dev. of ISI [Standard dev. del Jitter medio].