forked from mirzakhalili/Mirzakhalili-et-al--PloS-one-2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Figure_2_A.m
61 lines (52 loc) · 1.15 KB
/
Figure_2_A.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% Code by Ehsan Mirzakhalili [email protected]
% https://doi.org/10.1371/journal.pone.0201302
clc;
clear;
close all;
clf;
Cut=0;
TEnd=60;
cd Data
load('Day1-Control.mat');
cd ..
x=Data(1,:);
Data(1,:)=[];
y=mean(Data,1)';
s=std(Data,0,1)';
y(x<Cut)=[];
s(x<Cut)=[];
x(x<Cut)=[];
y(x>TEnd)=[];
s(x>TEnd)=[];
x(x>TEnd)=[];
cd Main
COLORS;
Par=Init;
M=Run(x,Par);
cd ..
MinY=-5;
MaxY=12;
h1=plot(x,M);
ax=gca;
set(ax, 'NextPlot', 'add');
h2=plot(x,y);
set(ax, 'NextPlot', 'add');
syms Stim
Scale=(MaxY-MinY)/20;Offset=MinY+1;
S=fplot((heaviside(Stim-10)-heaviside(Stim-40))*Scale+Offset,[0,60]);
text(21,-2.5,'Stimulus','Color',ST,'Fontsize',14);
box off;
set(h1,'color',MO,'linewidth',2);
set(h2,'color',F2,'linestyle','none','marker','.','markersize',12);
set(S,'color',ST,'linewidth',3);
set(ax,'fontsize',14);
set(ax,'linewidth',2);
ylim([MinY,MaxY]);
yticks(0:5:MaxY);
xlim([0,55]);
xlabel('Time [s]');
ylabel('FRET ratio change [%]');
L=legend('Model','Experiment');L.Box='off';
% legendmarkeradjust(18);
MyT=title('A', 'Units', 'normalized');
set(MyT,'Position', [-0.1 1.00], 'HorizontalAlignment', 'right');