Commit b859ce88 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

idea for example & fix some bugs

parent 813eb2c4
Pipeline #5440 failed with stages
......@@ -68,3 +68,11 @@ plot(Y(:, 6))
legend('acceptor bleaching')
close all
[D1, Y1] = rate_getpop(zeros(size(E)), P, 1000);
[D2, Y2] = rate_getpop(zeros(size(E)), P, [0 1000]);
figure
plot(1:100,Y1(:, 1),1:100,Y2(:, 1))
figure
plot(1:100, sum(D1, 2),1:100, sum(D2, 2))
\ No newline at end of file
......@@ -20,7 +20,7 @@ else
% allocate yield
Y = zeros(size(E, 1), 3);
end
P(1, 7)
% fill P with defaults
if size(P, 2) < 7
P(1, 7) = 0;
......@@ -33,10 +33,10 @@ D = zeros(size(E, 1), 4);
A = zeros(size(E, 1), 2);
if nargin == 3
% insert initial donor state
D(1:size(Di, 2)) = Di(1, :);
D(1, 1:size(Di, 2)) = Di(1, :)
if size(Di, 1) > 1
% insert initial acceptor state
A(1:size(Di, 2)) = Di(2, :);
A(1, 1:size(Di, 2)) = Di(2, :);
end
end
% get parameters from P for easier handling
......@@ -48,7 +48,7 @@ DF = P(1, 4);
Dp = P(1, 5);
DN = P(1, 6);
Db = P(1, 7);
if size(P, 1) == 11
if size(P, 2) == 11
Ds = P(1, 8);
DX = P(1, 9);
DS = P(1, 10);
......@@ -99,7 +99,7 @@ for t = 2:size(E, 1)
+ DX*D(t-1, 2) ... % incomming: decay from S2
- DS*D(t-1, 4)- DB*D(t-1, 4); % outgoing: decay to S1, bleaching
if size(P, 1) > 1
if nargout == 3
% acceptor fluorescence yield from S1
Y(t, 4) = Af*A(t-1, 1);
% acceptor phosphorescence yield from T1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment