Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Noel adamjgnoel

View GitHub Profile
View my_simulation_wrapper2.m
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
View my_simulation_function2.m
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)]);
View my_simulation_wrapper.m
myMean = 2; % RV mean
myVariance = 3; % RV variance
myLength = 100; % Length of random vector
myOutput = my_simulation_function(myMean, myVariance, myLength);
View my_simulation_function.m
function myOutput = my_simulation_function(myMean, myVariance, myLength)
myOutput = myMean + sqrt(myVariance)*randn(1,myLength);
View my_simulation.m
myMean = 2; % RV mean
myVariance = 3; % RV variance
myLength = 100; % Length of random vector
myOutput = myMean + sqrt(myVariance)*randn(1,myLength);
View beamer_color_example_setbeamercolor.tex
\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}
View beamer_color_example_usecolortheme.tex
\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