Skip to content

Commit 5513c77

Browse files
committed
Create RPE_Model_2022.m
1 parent c93c108 commit 5513c77

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

RPE/RPE_Model_2022.m

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
% Model of RPE cells
2+
% How much does the input resistance change by just closing the gap
3+
% junctions?
4+
5+
%% 2006 Fortier and Bagna
6+
%%% Equation 10
7+
8+
% R1 = R11 * (Rj + Rn)/((Rj + Rn) - f*R11)
9+
% simplified: R = R11 * (Rj + R)/((Rj + R) - f*R11)
10+
11+
%% solve algebraically
12+
% syms R R_I R_j;
13+
% eqn = R == RI * (R_j + R)/((R_j + R) - f*RI);
14+
% S = solve(eqn, RI);
15+
16+
% RI = [R*(Rj + R)]/ [J + R + f*R]
17+
18+
%% known values
19+
f = 6; % number of neighbors
20+
Rj = linspace(1, 10000, 1000)'; % range of gap junction resistance values to be tested
21+
R = [20, 200, 1000]; % measured input resistances tested
22+
23+
24+
%%
25+
26+
RI_vals = nan(length(Rj), length(R)); % single cell input resistance values
27+
CC_vals = nan(length(Rj), length(R)); % coupling coefficient values
28+
29+
for i = 1:length(R) % for each measured control resistance
30+
r = R(i);
31+
for j = 1:length(Rj) % for each gap junctional resistance
32+
rj = Rj(j);
33+
ri = (r*(rj+r)) / (rj + r + f*r);
34+
35+
RI_vals(j, i) = ri;
36+
cc = r / (rj + r);
37+
CC_vals(j, i) = cc;
38+
end
39+
end
40+
41+
42+
figure;
43+
subplot(2, 1, 1)
44+
plot(Rj, RI_vals, 'LineWidth', 2)
45+
xlabel('Rj (M Ohm)')
46+
ylabel('Input Resistance (M Ohm)')
47+
xlim([0 7500])
48+
legend(cellstr(num2str(R', ' Measured R=%-d')))
49+
subplot(2, 1, 2)
50+
plot(Rj, CC_vals, 'LineWidth', 2)
51+
xlabel('Rj (M Ohm)')
52+
ylabel('CC')
53+
xlim([0 7500])
54+
legend(cellstr(num2str(R', ' Measured R=%-d')))
55+
56+
% 0.025 to 0.15 is the physiological range of coupling coefficients
57+
Ind = CC_vals > 0.025 & CC_vals < 0.15;
58+
RI_CC_vals = RI_vals;
59+
RI_CC_vals(~Ind) = nan;
60+
figure;
61+
hold on
62+
for x = 1:length(R)
63+
scatter(Rj, RI_CC_vals(:, x), 'filled')
64+
end
65+
xlabel('Rj (M Ohm)')
66+
ylabel('Input R (M Ohm)')
67+
legend(cellstr(num2str(R', 'Measured R=%-d')))
68+
69+
% plot in conductance
70+
figure;
71+
subplot(2, 1, 1)
72+
plot(1./Rj, RI_vals, 'LineWidth', 2)
73+
xlabel('Gj (m Seimens)')
74+
xlim([0 0.1]); ylim([0 500]);
75+
ylabel('Input Resistance (M Ohm)')
76+
legend(cellstr(num2str(R', ' Measured R=%-d')))
77+
subplot(2, 1, 2)
78+
plot(1./Rj, CC_vals, 'LineWidth', 2)
79+
xlabel('Gj (m Seimens)')
80+
xlim([0 0.1])
81+
ylabel('CC')
82+
legend(cellstr(num2str(R', ' Measured R=%-d')))

0 commit comments

Comments
 (0)