diff --git a/Examples/example_ExtrinsicNoiseModels.m b/Examples/example_ExtrinsicNoiseModels.m
index 909691e..de488df 100644
--- a/Examples/example_ExtrinsicNoiseModels.m
+++ b/Examples/example_ExtrinsicNoiseModels.m
@@ -29,4 +29,5 @@
2+0.4*randn,...
1+0.2*randn];
extrinsicModel = extrinsicSSIT(Model1,parDistributions,20);
-Model1.makePlot(extrinsicModel.averagedResults,'marginals',[],[],[2,3])
\ No newline at end of file
+Model1.makePlot(extrinsicModel.averagedResults,'marginals',[],[],[2,3])
+legend('Intrinsic Only','Intrinsic + Extrinsic','Location','EastOutside')
\ No newline at end of file
diff --git a/Examples/example_FIMCalculation.m b/Examples/example_FIMCalculation.m
index 3fb610a..054ac45 100644
--- a/Examples/example_FIMCalculation.m
+++ b/Examples/example_FIMCalculation.m
@@ -13,21 +13,35 @@
%% (2) Solve FSP for model
F2.solutionScheme = 'FSP'; % Set solution scheme to FSP.
[FSPsoln,F2.fspOptions.bounds] = F2.solve; % Solve the FSP analysis
+% Plot the results from the FSP analysis
+fig1 = figure(1);clf; set(fig1,'Name','Marginal Distributions, mRNA');
+fig2 = figure(2);clf; set(fig2,'Name','Marginal Distributions, Protein');
+F2.makePlot(FSPsoln,'marginals',[1:4:21],false,[fig1,fig2],{'r-','linewidth',2})
%% (3) Solve FSP Sensitivity
F2.solutionScheme = 'fspSens'; % Set solutions scheme to FSP Sensitivity
[sensSoln,bounds] = F2.solve(FSPsoln.stateSpace); % Solve the sensitivity problem
+% Plot the results from the sensitivity analysis
+fig3 = figure(3);clf; set(fig3,'Name','Marginal Sensitivity, mRNA');
+fig4 = figure(4);clf; set(fig4,'Name','Marginal Sensitivity, Protein');
+F2.makePlot(sensSoln,'marginals',[],false,[fig3,fig4],{'b','linewidth',2})
%% (4) Compute FIM using FSP Sensitivity Results
fimResults = F2.computeFIM(sensSoln.sens); % Compute the FIM for full observations and no distortion.
cellCounts = 10*ones(size(F2.tSpan)); % Number of cells in each experiment.
[fimTotal,mleCovEstimate,fimMetrics] = F2.evaluateExperiment(fimResults,cellCounts)
+fig5 = figure(5);clf; set(fig5,'Name','Fim-Predicted Uncertainty Ellipses');
+F2.plotMHResults([],fimTotal,'lin',[],fig5)
+legend('FIM - Full Observation')
%% (5) Compute FIM for Partial Observations
F2.pdoOptions.PDO=[];
F2.pdoOptions.unobservedSpecies = 'x1';
[fimResults_partialObs] = F2.computeFIM(sensSoln.sens); % Compute the FIM for full observations and no distortion.
[fimTotal_partialObs,mleCovEstimate_partialObs,fimMetrics_partialObs] = F2.evaluateExperiment(fimResults_partialObs,cellCounts)
+fig6 = figure(6);clf; set(fig6,'Name','Fim-Predicted Uncertainty Ellipses');
+F2.plotMHResults([],[fimTotal,fimTotal_partialObs],'lin',[],fig6)
+legend('FIM - Full Observation','FIM - Protein Only')
%% (6) Compute FIM for Distorted Observation (Probabilistic Distortion Operator)
F2.pdoOptions.unobservedSpecies = 'x1';
@@ -36,17 +50,20 @@
pdoOptions.props.CaptureProbabilityS1 = 0; % Use zero for unobserved species.
pdoOptions.props.CaptureProbabilityS2 = 0.9;
-% call method to generate the PDO.
+% Call method to generate the PDO.
F2.pdoOptions.PDO = F2.generatePDO(pdoOptions,[],FSPsoln.fsp);
-% plot the PDO
+% Plot the PDO
N = size(F2.pdoOptions.PDO.conditionalPmfs{1});
-figure;
+fig7 = figure(7); set(fig7,'Name','Probabilistic Distortion Operator for Protein');
contourf([0:N(1)-1],[0:N(2)-1],log10(F2.pdoOptions.PDO.conditionalPmfs{1}));
% Here we wanted the first PDO for 'x2' because 'x1' was unobserved.
xlabel('Actual');ylabel('Observable');colorbar;
-% solve FIM using the specified PDO
+% Solve FIM using the specified PDO
[fimResults_BinomialPDO] = F2.computeFIM(sensSoln.sens); % Compute the FIM for full observations and no distortion.
[fimTotal_BinomialPDO,mleCovEstimate_BinomialPDO,fimMetrics_BinomialPDO] =...
- F2.evaluateExperiment(fimResults_BinomialPDO,cellCounts)
\ No newline at end of file
+ F2.evaluateExperiment(fimResults_BinomialPDO,cellCounts)
+fig8 = figure(8);clf; set(fig8,'Name','Fim-Predicted Uncertainty Ellipses');
+F2.plotMHResults([],[fimTotal,fimTotal_partialObs,fimTotal_BinomialPDO],'lin',[],fig8)
+legend('FIM - Full Observation','FIM - Protein Only','FIM - Protein with Error')
diff --git a/Examples/example_HybridModel.m b/Examples/example_HybridModel.m
index 689f91d..66bc330 100644
--- a/Examples/example_HybridModel.m
+++ b/Examples/example_HybridModel.m
@@ -27,6 +27,7 @@
Model2.hybridOptions.upstreamODEs = {'rna'};
[fspSoln2, Model2.fspOptions.bounds] = Model2.solve;
Model2.makePlot(fspSoln2,'marginals',[],[],3)
+legend('Full','QSSA for (n)','Location','eastoutside')
%% Example 2 - 5-species MAPK induction Model
% In this example, we consider a model of MAPK translocation to the nucleus
@@ -71,4 +72,4 @@
Model5.hybridOptions.upstreamODEs = {'mapkCyt','mapkNuc'};
[fspSoln5, Model5.fspOptions.bounds] = Model5.solve;
Model5.makePlot(fspSoln5,'marginals',[],[],[11,12,15])
-
+legend('Full','QSSA for (gene,MAKP)','QSSA for (MAKP)','Location','eastoutside')
diff --git a/Examples/example_IterativeBayesianExperimentDesign.m b/Examples/example_IterativeBayesianExperimentDesign.m
index 799f206..1500042 100644
--- a/Examples/example_IterativeBayesianExperimentDesign.m
+++ b/Examples/example_IterativeBayesianExperimentDesign.m
@@ -34,6 +34,8 @@
fitParameters = [1:4];
end
+experimentDesignCriteria =
+
saveFileName = ['IterativeExperimentResults_',example];
%% Generate Model Propensity Functions and Solve True Model
diff --git a/Examples/example_ModelReductionTool.m b/Examples/example_ModelReductionTool.m
index 387321e..1f4287c 100644
--- a/Examples/example_ModelReductionTool.m
+++ b/Examples/example_ModelReductionTool.m
@@ -135,7 +135,10 @@
% Make Figures to compare the results. Here, we will plot the original
% model in blue and the reduced model in red lines.
Model1.makePlot(fspSoln,'meansAndDevs',[],[],1,{'Color',[0,0,1]})
-Model1.makePlot(fspSoln,'marginals',[],[],[2,3],{'Color',[0,0,1]})
-
Model2.makePlot(fspSolnRed,'meansAndDevs',[],[],1,{'Color',[1,0,0]})
-Model2.makePlot(fspSolnRed,'marginals',[],[],[2,3],{'Color',[1,0,0]})
\ No newline at end of file
+figure(1);legend('Full','Reduced','Location','southeast')
+
+Model1.makePlot(fspSoln,'marginals',[],[],[2,3],{'Color',[0,0,1]})
+Model2.makePlot(fspSolnRed,'marginals',[],[],[2,3],{'Color',[1,0,0]})
+figure(2);legend('Full','Reduced','Location','eastoutside')
+figure(3);legend('Full','Reduced','Location','eastoutside')
\ No newline at end of file
diff --git a/Examples/html/example_EscapeTimes.html b/Examples/html/example_EscapeTimes.html
index 54e4027..f6a3baf 100644
--- a/Examples/html/example_EscapeTimes.html
+++ b/Examples/html/example_EscapeTimes.html
@@ -6,7 +6,7 @@
Generate, solve and plot results for an extrinsic noise version
Specify the rules for the extrinsic noise. This must be a function that returns a vector of parameters, that are in the same order as the parameters provided. You can choose a different distribution for the extrinsic noise in each parameter.