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: Finding end-points for runs
Replies: 4   Last Post: Jan 27, 2013 7:55 AM

Advanced Search

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

Posts: 24
Registered: 10/20/05
Re: Finding end-points for runs
Posted: Jan 27, 2013 7:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Sunday, January 27, 2013 3:27:06 AM UTC-5, Bruno Luong wrote:
> Just to make it shorter
> b = [true diff(Y)>1]
> Z = [Y(b)-1; Y([b(2:end) true])+1];
> Z = Z(:,cumsum(b))'
> % Bruno

Thank you Roger an Bruno. That was immensely helpful!

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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.