Skip to content

Instantly share code, notes, and snippets.

View adamjgnoel's full-sized avatar

Adam Noel adamjgnoel

View GitHub Profile
\documentclass[xcolor=dvipsnames]{beamer} % dvipsnames gives more built-in colors
\usetheme{Madrid}
\useoutertheme{miniframes} % Alternatively: miniframes, infolines, split
\useinnertheme{circles}
\definecolor{UBCblue}{rgb}{0.04706, 0.13725, 0.26667} % UBC Blue (primary)
\usecolortheme[named=UBCblue]{structure}
%\usecolortheme[named=Mahogany]{structure} % Sample dvipsnames color
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Madrid}
\useoutertheme{miniframes} % Alternatively: miniframes, infolines, split
\useinnertheme{circles}
\definecolor{UBCblue}{rgb}{0.04706, 0.13725, 0.26667} % UBC Blue (primary)
\definecolor{UBCgrey}{rgb}{0.3686, 0.5255, 0.6235} % UBC Grey (secondary)
\setbeamercolor{palette primary}{bg=UBCblue,fg=white}
myMean = 2; % RV mean
myVariance = 3; % RV variance
myLength = 100; % Length of random vector
myOutput = myMean + sqrt(myVariance)*randn(1,myLength);
function myOutput = my_simulation_function(myMean, myVariance, myLength)
myOutput = myMean + sqrt(myVariance)*randn(1,myLength);
myMean = 2; % RV mean
myVariance = 3; % RV variance
myLength = 100; % Length of random vector
myOutput = my_simulation_function(myMean, myVariance, myLength);
function myOutput = my_simulation_function2(myMean, myVariance, myLength)
% Sample function that saves output to a custom file.
myOutput = myMean + sqrt(myVariance)*randn(1,myLength);
save(['my_simulation_output_mean_' num2str(myMean) '_var_' num2str(myVariance) '_length_' num2str(myLength)]);
myMean = -5:5; % RV mean
myVariance = 3; % RV variance
myLength = 100; % Length of random vector
for i = 1:length(myMean)
for j = 1:length(myVariance)
for k = 1:length(myLength)
my_simulation_function2(myMean(i), myVariance(j), myLength(k));
end
end
% Plotting take 1
x = 1e-2:1e-2:100;
% Smooth curves
y1 = exp(-x);
y2 = 1-exp(-x);
% Noisy curves
n = length(x);
% Plotting take 2
x = 1e-2:1e-2:100;
% Smooth curves
y1 = exp(-x);
y2 = 1-exp(-x);
% Noisy curves
n = length(x);
% Plotting take 3
x = 1e-2:1e-2:100;
% Smooth curves
y1 = exp(-x);
y2 = 1-exp(-x);
% Noisy curves
n = length(x);