Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: sum of result of two rows with third row
Replies: 3   Last Post: Aug 27, 2013 2:38 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 8,867
Registered: 6/7/07
Re: sum of result of two rows with third row
Posted: Aug 27, 2013 2:38 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 8/27/2013 1:03 PM, Shatrughan wrote:
> Thanks a lot "IceHaven" !! this worked like what i was expecting..
> :)


>> if so, then this should work for you
>> B = A;
>> for i = 2:length(A)
>> B(i) = mod(B(i-1)+B(i),5);
>> end

doc accumarray


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.