Matlab HW 1 - 4C

% since we cannot sum from 0 to infinite, we just sum from 0 to a large value N.
n=[0:1:100000000];
x=(.5).^n).*(cos(0.5*pi.*n));
sum(x)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License