home

Scientific Computing (Psychology 9040a)

Fall, 2021

Advent of Code 2015 Day 1


Solve the Advent Of Code 2015 Day 1 puzzle.

Log in to the Advent of Code site, “click get your puzzle input”, and then you can select it all with your mouse, copy, and then paste it into your MATLAB script as a long character string, and assign it to a variable (e.g. P).

Another option is to paste the puzzle input into a plain text file (e.g. called puzzle_input.txt) and then use MATLAB’s fileread() function to read it in as a long character string, and assign it to a variable P:

P = fileread('puzzle_input.txt');