Thread Subject: How to divide the data into equal chunks

Subject: How to divide the data into equal chunks

From: Joe Frank

Date: 18 Mar, 2009 12:57:01

Message: 1 of 5

Hi all,

I have a set of data and I need to divide it in equal chunks. How do I do it?

Example: data ranging from [70...100]
              I need to divide it equally like [70..75..80..85..90..95..100]

How to do this?

Thanks,
Joe

Subject: How to divide the data into equal chunks

From: John D'Errico

Date: 18 Mar, 2009 13:14:01

Message: 2 of 5

"Joe Frank" <sascod@gmail.com> wrote in message <gpqr2t$c5k$1@fred.mathworks.com>...
> Hi all,
>
> I have a set of data and I need to divide it in equal chunks. How do I do it?
>
> Example: data ranging from [70...100]
> I need to divide it equally like [70..75..80..85..90..95..100]
>
> How to do this?
>
> Thanks,
> Joe

A histogram. Use hist or histc.

John

Subject: How to divide the data into equal chunks

From: Joe Frank

Date: 18 Mar, 2009 13:30:18

Message: 3 of 5

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gpqs2p$lgb$1@fred.mathworks.com>...
> "Joe Frank" <sascod@gmail.com> wrote in message <gpqr2t$c5k$1@fred.mathworks.com>...
> > Hi all,
> >
> > I have a set of data and I need to divide it in equal chunks. How do I do it?
> >
> > Example: data ranging from [70...100]
> > I need to divide it equally like [70..75..80..85..90..95..100]
> >
> > How to do this?
> >
> > Thanks,
> > Joe
>
> A histogram. Use hist or histc.
>
> John

John,

It's not an image processing problem. Its just some random array data. So I cant sue Histogram.

Can u give me some otehr ideas

Thanks,
Joe

Subject: How to divide the data into equal chunks

From: us

Date: 18 Mar, 2009 13:48:01

Message: 4 of 5

"Joe Frank"
> "John D'Errico"
> > > Example: data ranging from [70...100]
> > > I need to divide it equally like [70..75..80..85..90..95..100]
> > A histogram. Use hist or histc.

> John,
> It's not an image processing problem. Its just some random array data. So I cant sue Histogram.
> Can u give me some otehr ideas...

first and foremost, if john d'errico drops in with a solution - it IS TO BE considered!
second, did you even BOTHER TO TRY what he told you...

what happens here

     d=10*rand(1,10);
     e=[0,3,9,10];
     [n,ix]=histc(d,e)
     disp([d;ix;e(ix)]);

us

Subject: How to divide the data into equal chunks

From: Joe Frank

Date: 18 Mar, 2009 13:58:01

Message: 5 of 5

"us " <us@neurol.unizh.ch> wrote in message <gpqu2h$dmp$1@fred.mathworks.com>...
> "Joe Frank"
> > "John D'Errico"
> > > > Example: data ranging from [70...100]
> > > > I need to divide it equally like [70..75..80..85..90..95..100]
> > > A histogram. Use hist or histc.
>
> > John,
> > It's not an image processing problem. Its just some random array data. So I cant sue Histogram.
> > Can u give me some otehr ideas...
>
> first and foremost, if john d'errico drops in with a solution - it IS TO BE considered!
> second, did you even BOTHER TO TRY what he told you...
>
> what happens here
>
> d=10*rand(1,10);
> e=[0,3,9,10];
> [n,ix]=histc(d,e)
> disp([d;ix;e(ix)]);
>
> us


I'm sorry.. I'm new to Matlab and Programming.. Please accept my apologies..

Thanks

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
scolding us 18 Mar, 2009 09:50:20
rssFeed for this Thread

Contact us at files@mathworks.com