function [] = eda(low,high,sensitivity) % low = lower range of skin conductance (uS) L=low; % high = upper range of skin conductance (uS) H=high; % sensitivity = corresponds to value of C1 % the higher this is set, the more linear the % curve Cx = [1:.1:80]; C1 = sensitive; % choose C1 -> sensitivity R1 = 1e6/C1 C2 = C1; % how to choose C2 R2 = 1e6/C2 C3 = H; % how to choose C3 R3 = 1e6/C3 R = C2/(C2+C3); G = 10/(C1/(C1+L)-R) % calculates gain V = 0.5*G*(C1./(C1+Cx)-R); V0 = V(2:end); V1 = V(1:end-1); dV = V0-V1; plot(Cx,V); % plots skin conductance vs output voltage axis([L H 0 5]);