From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Summing numbers in an M file in MATLAB
Date: Thu, 12 May 2011 17:20:09 +0000 (UTC)
Organization: San Francisco State University
Lines: 9
Message-ID: <iqh4s8$em7$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1305220809 15047 (12 May 2011 17:20:09 GMT)
NNTP-Posting-Date: Thu, 12 May 2011 17:20:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2869915
Xref: comp.soft-sys.matlab:726436

here's my code. I'm wondering what else I need to add to sum up all the numbers at the end. 

a = input('Enter number of days you would like to know the total of');
f(1) = .01;
for i = 2:a
    f(i) = (2*f(i-1));

Would sum(sum(2:a)) work right before the "end"?