%This is an example script where we will calculate the fibonacci sequence
clc %clear command window
clear %clear variables

sequence = zeros(1,20); %create empty array to hold our sequence
sequence(1) = 1; %initialize the first two values
sequence(2) = 1;

for q = 3:20
    sequence(q) = sequence(q-2) + sequence(q-1); %calculate next element by adding the previous two values
end

disp(sequence) %display results

