diff --git a/Plots.m b/Plots.m index 96a91a6..1134f8f 100644 --- a/Plots.m +++ b/Plots.m @@ -1,5 +1,5 @@ % mex command is given by: -% mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus.cpp Thalamic_Colum.cpp +% mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus.cpp Thalamic_Column.cpp function Plots(T, onset) diff --git a/Stimulation.h b/Stimulation.h index 4341cc6..371f617 100644 --- a/Stimulation.h +++ b/Stimulation.h @@ -69,7 +69,7 @@ class Stim { // stimulation strength double strength = 0.0; - // inter stimulus intervall + // inter stimulus interval int ISI = 0; // onset until stimulation starts diff --git a/Thalamic_Column.cpp b/Thalamic_Column.cpp index 1c37677..37170e8 100644 --- a/Thalamic_Column.cpp +++ b/Thalamic_Column.cpp @@ -51,27 +51,27 @@ double Thalamic_Column::get_Qr (int N) const{ // excitatory input to TC population double Thalamic_Column::I_et (int N) const{ _SWITCH((Vt)(Phi_tt)) - double psi = g_AMPA * var_Phi_tt * (var_Vt - V_rev_e); + double psi = g_AMPA * var_Phi_tt * (var_Vt - E_AMPA); return psi; } // inhibitory input to TC population double Thalamic_Column::I_it (int N) const{ _SWITCH((Vt)(Phi_rt)) - double psi = g_GABA * var_Phi_rt * (var_Vt - V_rev_i); + double psi = g_GABA * var_Phi_rt * (var_Vt - E_GABA); return psi; } // excitatory input to RE population double Thalamic_Column::I_er (int N) const{ _SWITCH((Vr)(Phi_tr)) - double psi = g_AMPA * var_Phi_tr * (var_Vr - V_rev_e); + double psi = g_AMPA * var_Phi_tr * (var_Vr - E_AMPA); return psi; } // inhibitory input to RE population double Thalamic_Column::I_ir (int N) const{ _SWITCH((Vr)(Phi_rr)) - double psi = g_GABA * var_Phi_rr * (var_Vr - V_rev_i); + double psi = g_GABA * var_Phi_rr * (var_Vr - E_GABA); return psi; } /****************************************************************************************************/ diff --git a/Thalamic_Column.h b/Thalamic_Column.h index 89ea2cb..93eecc0 100644 --- a/Thalamic_Column.h +++ b/Thalamic_Column.h @@ -50,6 +50,9 @@ class Thalamic_Column { // Initialize the RNGs void set_RNG (void); + // change the strength of input + void set_input (double I) {input = I;} + // Firing rates double get_Qt (int) const; double get_Qr (int) const; diff --git a/Thalamus.cpp b/Thalamus.cpp index 3846e1b..09afdd8 100644 --- a/Thalamus.cpp +++ b/Thalamus.cpp @@ -37,14 +37,15 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Fetch inputs const int T = (int) (mxGetScalar(prhs[0])); - double* Connectivity = mxGetPr (prhs[1]); + const int Time = (T+onset)*res; + double* Param_Thalamus = mxGetPr (prhs[1]); double* var_stim = mxGetPr (prhs[2]); // Initializing the populations; - Thalamic_Column Thalamus(Connectivity); + Thalamic_Column Thalamus(Param_Thalamus); // Initialize the stimulation protocol - Stim Stimulation(Thalamus, Var_Stim); + Stim Stimulation(Thalamus, var_stim); // setting up the data containers mxArray* Vt = SetMexArray(1, T*red); diff --git a/parameters.h b/parameters.h index 2f72bcd..35aeda8 100644 --- a/parameters.h +++ b/parameters.h @@ -78,8 +78,8 @@ /* reversal potentials */ /****************************************************************************************************/ // synaptic inputs in mV -#define V_rev_e 0 -#define V_rev_i -70 +#define E_AMPA 0 +#define E_GABA -70 // Leak current #define E_L_t -70