-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfind_variability_N0.m
executable file
·63 lines (54 loc) · 1.64 KB
/
find_variability_N0.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
62
63
% This script find the distribution of cells actually seeded for an attempt
% at sorting N0=8 cells. This distribution will be scaled appropriately and
% used to draw from in the initial cell number used in the Gillespie
% Algorithm stochastic modeling simulations
close all; clear all; clc
[N, T] =xlsread('../data/N8variability.xls');
Ntot= N(:,1);
Ngreen = N(:,2);
Nred = N(:,3);
mu = mean(Ntot)
sigma = std(Ntot)
figure (2)
hold off
histogram(Ntot, 8)
hold on
text(3, 4, ['\mu= ', num2str(round(mu,2)), ', \sigma= ', num2str(round(sigma,2))])
xlabel ('Number of Cells Observed in Well')
xlim([0 8])
ylim([ 0 25])
ylabel('Frequency')
title( 'Distribution of Actual Cell Seeding when N_{0}=8')
%%
figure(1)
subplot(1,3,1)
hold off
histogram(Ntot, 8)
hold on
text(3, 4, ['\mu= ', num2str(round(mu,2)), ', \sigma= ', num2str(round(sigma,2))])
xlabel ('Number of Cells Observed in Well')
xlim([0 10])
ylabel('Frequency')
title( 'Distribution of Cell Seeding when N_{seed}=8')
distrib = normrnd(mu, sigma,[1000,1])
int_distrib = abs(round(distrib,0));
subplot(1,3,2)
hold off
histogram(abs(distrib))
hold on
text(3, 50, ['\mu= ', num2str(round(mu,2)), ', \sigma= ', num2str(round(sigma,2))])
xlabel ('Number of Cells Simulated')
xlim([0 10])
ylabel('Frequency')
title( 'Simulated N_{seed}=8')
subplot(1,3,3)
hold off
histogram(int_distrib, 8)
hold on
text(3, 50, ['\mu= ', num2str(round(mu,2)), ', \sigma= ', num2str(round(sigma,2))])
xlabel ('Number of Cells Simulated')
xlim([0 10])
ylabel('Frequency')
title( 'Simulated Rounded N_{seed}=8')
distrib8 = [mu, sigma];
save('../out/distrib8.mat', 'distrib8')