function [pna,pk,pcl]=circuit(cinna,coutna,cink,coutk,cincl,coutcl)
%this function will help us calculate the potential difference across the
%membrane created by the three different ions, sodium (na), potassium (k),
%and chloride (cl).

%initialize the variables that we are using.
Ina=zeros(1,988);
Rna=zeros(1,988);
DeltaVna=zeros(1,988);
Ik=zeros(1,988);
Rk=zeros(1,988);
DeltaVk=zeros(1,988);
Icl=zeros(1,988);
Rcl=zeros(1,988);
DeltaVcl=zeros(1,988);

%Constants:
gna=5; %units: inverse ohms * inverse meters squared.
gk=80;
gcl=40;

KbT=4.1; %units: piconewton * nanometers
z=1; %valenace of the ions (one for all ions present).
A=10*10.^-18; %area of the membrane. units: meters
C=A*10.^-2; %units: Farads * inverse meters squared

%calculate the different nernst potentials for the different ions.


%the different variables needed to figure out deltav.
 %units inverse meters squared * inverse seconds


%units: amperes


 %units: ohms


%units: volts.


 %gna increase as neuron depolarizes.


%Next, we calculate DeltaV for each ion as the neuron depolarizes. 
%This will model the first half of the action potential.


%Next, we calculate DeltaV for each ion as their conductance goes up or
%down. This will model the second half of the action potential.

%gna decreases as the neuron hyperpolarizes.
