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: Count numbers considering all cosecutive as one
Replies: 1   Last Post: Jan 20, 2013 2:58 PM

Advanced Search

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

Posts: 2
Registered: 11/13/12
Count numbers considering all cosecutive as one
Posted: Jan 20, 2013 1:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, I need to count some numbers like:
Data=2, 3, 4, 7,8 9, 10, 20,25,27;
20=1; 25=1; 27=1;
total count=5 (1+1+1+1+1)
i.e. consecutive numbers should be count as one together and any individual value should be one.
Any help regarding matlab programming would be highly appreciated.
Thanks in advance.

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.