The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 27
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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.