f = 1;
for t = 1:10
    f = f * t;
end
f
s = 0;
for t = [1 4 9 16 25]
    s = s + t;
end
s
s = 0;
for z = 1:1000
    s = s + 1 / (z ^ 2);
end
s
s = 1;
for p = 1:100
    s = 1 + 1 / s;
end
s
s = 1;
for t = 1:1000
    s = 1 / (1001 - t) + 1 / s;
end
2 + 2 / s
s = 0;
for x = 1:100
    s = cos(s);
end
s
v = [5 4 3 2 1]; s = v;
for c = 2:5
    s(c) = s(c - 1) + v(c);
end
s
s = [5 4 3 2 1];
for c = 2:5
    s(c) = s(c - 1) + s(c);
end
s
s = [1 1 1 1; 1 0 0 0; 1 0 0 0];
for r = 2:3
    for c = 2:4
        s(r, c) = s(r - 1, c) + s(r, c - 1);
    end
end
s
m = [1 0 1 0; 0 1 0 1; 1 0 1 0];
s = zeros(4, 5);
for r = 1:3
    for c = 1:4
        s(r + 1, c + 1) = m(r, c) + s(r + 1, c) + s(r, c + 1) - s(r, c);
    end
end
s