Path: news.mathworks.com!not-for-mail
From: "Sean de " <sean.dewolski@nospamplease.umit.maine.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab 3-d Walk problem
Date: Fri, 19 Nov 2010 19:23:03 +0000 (UTC)
Organization: University of Maine
Lines: 4
Message-ID: <ic6iqn$igi$1@fred.mathworks.com>
References: <ic4j4j$oqf$1@fred.mathworks.com> <ic4l4d$1n9$1@fred.mathworks.com> <ic4mfg$r55$1@fred.mathworks.com> <ic4nms$fk9$1@fred.mathworks.com> <ic53un$jf2$1@fred.mathworks.com> <ic6i0g$o8e$1@fred.mathworks.com>
Reply-To: "Sean de " <sean.dewolski@nospamplease.umit.maine.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1290194583 18962 172.30.248.38 (19 Nov 2010 19:23:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 19 Nov 2010 19:23:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2256903
Xref: news.mathworks.com comp.soft-sys.matlab:688446

"Justin Twardowski" <jtwardow@email.arizona.edu> wrote in message <ic6i0g$o8e$1@fred.mathworks.com>...
> That method seems better.  For this project, I'm supposed to run through data sets for the number of steps being 100, 1000, 10000 and 100000 so it was taking a while to run.  MY question now is, would there be a way to just return the final value instead of the value after each iteration?  That would be much easier to work with when I have to run my data analysis.

So instead of using cumsum, which updates at each step, just use sum to get the end result?