From: Mike on
On Apr 6, 5:08 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
wrote:
> Mike <sulfate...(a)gmail.com> wrote in message <1ded3af1-e437-4c96-9d9a-5e0bdd648...(a)g30g2000yqc.googlegroups.com>...
> > On Apr 6, 4:41 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > wrote:
> > > Mike <sulfate...(a)gmail.com> wrote in message <126ecdbc-f3e0-411c-b99a-9aae2d7dc...(a)w17g2000yqj.googlegroups.com>...
> > > > Hi
>
> > > >   I have try hard but still don't know how to solve this question..
> > > > Let's say  X has some values, specified by datenumber.
> > > > I'd like to find, or group, those values within some dates, e.g. 14
> > > > days or 7 days.
> > > > For example, datenumber values X (certainly datenumber won't like the
> > > > following values)
> > > > X=[3 5 2 20 1 99];
> > > > I like to find only
> > > > 3,5,2,1  if 14 days are selected.
>
> > > > How to write this function?
> > > > many thanks in advance.
>
> > > > Mike
>
> > > for vector X you just write:
>
> > > F = find(X<=14);
> > > X_new = X(F);- Hide quoted text -
>
> > > - Show quoted text -
>
> > No.  not number <= 14.  sorry I need to say clearer.
> > I'd like to find image_ids which are imaged within some dates, say 14
> > days.
>
> > Mike
>
> Im sorry, I cant underytand.
>
> couldnt you send a clear example please?
>
> nico- Hide quoted text -
>
> - Show quoted text -

Sorry again.
Let's say

X=[ id10 2;
id2 5;
id77 66;
id3 3;
id8 33;
id7 90;
id20 91;]

first column is string for image id label; second columns are the
numbers after datenum (i have simplified them. I want to find images
are within some T dates. Let's say T=7 for second column.
So the output should be:

group1=[ id10 2;
id2 5;
id3 3]

group2=[ id7 90;
id20 91;]
Since the numbers in these two groups are within T.

Mike

From: TideMan on
On Apr 7, 12:48 pm, Mike <sulfate...(a)gmail.com> wrote:
> On Apr 6, 5:08 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> wrote:
>
>
>
> > Mike <sulfate...(a)gmail.com> wrote in message <1ded3af1-e437-4c96-9d9a-5e0bdd648...(a)g30g2000yqc.googlegroups.com>...
> > > On Apr 6, 4:41 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > wrote:
> > > > Mike <sulfate...(a)gmail.com> wrote in message <126ecdbc-f3e0-411c-b99a-9aae2d7dc...(a)w17g2000yqj.googlegroups.com>...
> > > > > Hi
>
> > > > >   I have try hard but still don't know how to solve this question.
> > > > > Let's say  X has some values, specified by datenumber.
> > > > > I'd like to find, or group, those values within some dates, e.g. 14
> > > > > days or 7 days.
> > > > > For example, datenumber values X (certainly datenumber won't like the
> > > > > following values)
> > > > > X=[3 5 2 20 1 99];
> > > > > I like to find only
> > > > > 3,5,2,1  if 14 days are selected.
>
> > > > > How to write this function?
> > > > > many thanks in advance.
>
> > > > > Mike
>
> > > > for vector X you just write:
>
> > > > F = find(X<=14);
> > > > X_new = X(F);- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > No.  not number <= 14.  sorry I need to say clearer.
> > > I'd like to find image_ids which are imaged within some dates, say 14
> > > days.
>
> > > Mike
>
> > Im sorry, I cant underytand.
>
> > couldnt you send a clear example please?
>
> > nico- Hide quoted text -
>
> > - Show quoted text -
>
> Sorry again.
> Let's say
>
> X=[ id10    2;
>       id2      5;
>       id77     66;
>       id3      3;
>       id8      33;
>       id7      90;
>       id20    91;]
>
> first column is string for image id label; second columns are the
> numbers after datenum (i have simplified them.  I want to find images
> are within some T dates. Let's say T=7 for second column.
> So the output should be:
>
> group1=[ id10    2;
>       id2      5;
>       id3      3]
>
> group2=[      id7      90;
>                     id20    91;]
> Since the numbers in these two groups are within T.
>
> Mike

Well, Nico has already told you how to do it.
Did you try what he suggested?

First off, you cannot define a matrix as you have where strings and
numbers are mixed.
Most likely, you have two vectors:
X=[3 5 2 20 1 99];
and
id={'id1','id2','id3','id4','id5','id6'};

Define a logical index:
indx=X <= 7;
then:
id(indx) are the data that fit the criterion
id(~indx) are the data that do not fit the criterion.
From: Mike on
On Apr 7, 9:57 am, TideMan <mul...(a)gmail.com> wrote:
> On Apr 7, 12:48 pm, Mike <sulfate...(a)gmail.com> wrote:
>
>
>
>
>
> > On Apr 6, 5:08 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > wrote:
>
> > > Mike <sulfate...(a)gmail.com> wrote in message <1ded3af1-e437-4c96-9d9a-5e0bdd648...(a)g30g2000yqc.googlegroups.com>...
> > > > On Apr 6, 4:41 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > > wrote:
> > > > > Mike <sulfate...(a)gmail.com> wrote in message <126ecdbc-f3e0-411c-b99a-9aae2d7dc...(a)w17g2000yqj.googlegroups.com>...
> > > > > > Hi
>
> > > > > >   I have try hard but still don't know how to solve this question.
> > > > > > Let's say  X has some values, specified by datenumber.
> > > > > > I'd like to find, or group, those values within some dates, e.g.. 14
> > > > > > days or 7 days.
> > > > > > For example, datenumber values X (certainly datenumber won't like the
> > > > > > following values)
> > > > > > X=[3 5 2 20 1 99];
> > > > > > I like to find only
> > > > > > 3,5,2,1  if 14 days are selected.
>
> > > > > > How to write this function?
> > > > > > many thanks in advance.
>
> > > > > > Mike
>
> > > > > for vector X you just write:
>
> > > > > F = find(X<=14);
> > > > > X_new = X(F);- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > > No.  not number <= 14.  sorry I need to say clearer.
> > > > I'd like to find image_ids which are imaged within some dates, say 14
> > > > days.
>
> > > > Mike
>
> > > Im sorry, I cant underytand.
>
> > > couldnt you send a clear example please?
>
> > > nico- Hide quoted text -
>
> > > - Show quoted text -
>
> > Sorry again.
> > Let's say
>
> > X=[ id10    2;
> >       id2      5;
> >       id77     66;
> >       id3      3;
> >       id8      33;
> >       id7      90;
> >       id20    91;]
>
> > first column is string for image id label; second columns are the
> > numbers after datenum (i have simplified them.  I want to find images
> > are within some T dates. Let's say T=7 for second column.
> > So the output should be:
>
> > group1=[ id10    2;
> >       id2      5;
> >       id3      3]
>
> > group2=[      id7      90;
> >                     id20    91;]
> > Since the numbers in these two groups are within T.
>
> > Mike
>
> Well, Nico has already told you how to do it.
> Did you try what he suggested?
>
> First off, you cannot define a matrix as you have where strings and
> numbers are mixed.
> Most likely, you have two vectors:
> X=[3 5 2 20 1 99];
> and
> id={'id1','id2','id3','id4','id5','id6'};
>
> Define a logical index:
> indx=X <= 7;
> then:
> id(indx)  are the data that fit the criterion
> id(~indx) are the data that do not fit the criterion.- Hide quoted text -
>
> - Show quoted text -

Thank you for your reply. But
if I try
X=[3 5 2 20 1 99 98 66];
id={'id1','id2','id3','id4','id5','id6','id7','id8'};
indx=X <= 7;
id(indx)

ans =

'id1' 'id2' 'id3' 'id5'

The answer should be
'id1' 'id2' 'id3' 'id5' 'id6' 'id7', since the last two
values of X are within the range of 7.
sorry, I didn't say it very clearly.
I'd like to find values are very close, say within 7.

Mike
From: TideMan on
On Apr 7, 2:20 pm, Mike <sulfate...(a)gmail.com> wrote:
> On Apr 7, 9:57 am, TideMan <mul...(a)gmail.com> wrote:
>
>
>
> > On Apr 7, 12:48 pm, Mike <sulfate...(a)gmail.com> wrote:
>
> > > On Apr 6, 5:08 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > wrote:
>
> > > > Mike <sulfate...(a)gmail.com> wrote in message <1ded3af1-e437-4c96-9d9a-5e0bdd648...(a)g30g2000yqc.googlegroups.com>...
> > > > > On Apr 6, 4:41 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > > > wrote:
> > > > > > Mike <sulfate...(a)gmail.com> wrote in message <126ecdbc-f3e0-411c-b99a-9aae2d7dc...(a)w17g2000yqj.googlegroups.com>...
> > > > > > > Hi
>
> > > > > > >   I have try hard but still don't know how to solve this question.
> > > > > > > Let's say  X has some values, specified by datenumber.
> > > > > > > I'd like to find, or group, those values within some dates, e..g. 14
> > > > > > > days or 7 days.
> > > > > > > For example, datenumber values X (certainly datenumber won't like the
> > > > > > > following values)
> > > > > > > X=[3 5 2 20 1 99];
> > > > > > > I like to find only
> > > > > > > 3,5,2,1  if 14 days are selected.
>
> > > > > > > How to write this function?
> > > > > > > many thanks in advance.
>
> > > > > > > Mike
>
> > > > > > for vector X you just write:
>
> > > > > > F = find(X<=14);
> > > > > > X_new = X(F);- Hide quoted text -
>
> > > > > > - Show quoted text -
>
> > > > > No.  not number <= 14.  sorry I need to say clearer.
> > > > > I'd like to find image_ids which are imaged within some dates, say 14
> > > > > days.
>
> > > > > Mike
>
> > > > Im sorry, I cant underytand.
>
> > > > couldnt you send a clear example please?
>
> > > > nico- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > Sorry again.
> > > Let's say
>
> > > X=[ id10    2;
> > >       id2      5;
> > >       id77     66;
> > >       id3      3;
> > >       id8      33;
> > >       id7      90;
> > >       id20    91;]
>
> > > first column is string for image id label; second columns are the
> > > numbers after datenum (i have simplified them.  I want to find images
> > > are within some T dates. Let's say T=7 for second column.
> > > So the output should be:
>
> > > group1=[ id10    2;
> > >       id2      5;
> > >       id3      3]
>
> > > group2=[      id7      90;
> > >                     id20    91;]
> > > Since the numbers in these two groups are within T.
>
> > > Mike
>
> > Well, Nico has already told you how to do it.
> > Did you try what he suggested?
>
> > First off, you cannot define a matrix as you have where strings and
> > numbers are mixed.
> > Most likely, you have two vectors:
> > X=[3 5 2 20 1 99];
> > and
> > id={'id1','id2','id3','id4','id5','id6'};
>
> > Define a logical index:
> > indx=X <= 7;
> > then:
> > id(indx)  are the data that fit the criterion
> > id(~indx) are the data that do not fit the criterion.- Hide quoted text -
>
> > - Show quoted text -
>
> Thank you for your reply.  But
> if I try
> X=[3 5 2 20 1 99 98 66];
> id={'id1','id2','id3','id4','id5','id6','id7','id8'};
> indx=X <= 7;
> id(indx)
>
> ans =
>
>     'id1'    'id2'    'id3'    'id5'
>
> The answer should be
> 'id1'    'id2'    'id3'    'id5'  'id6' 'id7', since the last two
> values of X are within the range of 7.
> sorry, I didn't say it very clearly.
> I'd like to find values are very close, say within 7.
>
> Mike

What do you mean, the last two values of X are "within the range of
7"?
They are 98 and 66, which are numbers greater than 7 where I live.
From: Mike on
On Apr 7, 10:30 am, TideMan <mul...(a)gmail.com> wrote:
> On Apr 7, 2:20 pm, Mike <sulfate...(a)gmail.com> wrote:
>
>
>
>
>
> > On Apr 7, 9:57 am, TideMan <mul...(a)gmail.com> wrote:
>
> > > On Apr 7, 12:48 pm, Mike <sulfate...(a)gmail.com> wrote:
>
> > > > On Apr 6, 5:08 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > > wrote:
>
> > > > > Mike <sulfate...(a)gmail.com> wrote in message <1ded3af1-e437-4c96-9d9a-5e0bdd648...(a)g30g2000yqc.googlegroups.com>...
> > > > > > On Apr 6, 4:41 pm, "nico cruz" <m.nicolas.c...(a)mailbox.tu-berlin.de>
> > > > > > wrote:
> > > > > > > Mike <sulfate...(a)gmail.com> wrote in message <126ecdbc-f3e0-411c-b99a-9aae2d7dc...(a)w17g2000yqj.googlegroups.com>...
> > > > > > > > Hi
>
> > > > > > > >   I have try hard but still don't know how to solve this question.
> > > > > > > > Let's say  X has some values, specified by datenumber.
> > > > > > > > I'd like to find, or group, those values within some dates, e.g. 14
> > > > > > > > days or 7 days.
> > > > > > > > For example, datenumber values X (certainly datenumber won't like the
> > > > > > > > following values)
> > > > > > > > X=[3 5 2 20 1 99];
> > > > > > > > I like to find only
> > > > > > > > 3,5,2,1  if 14 days are selected.
>
> > > > > > > > How to write this function?
> > > > > > > > many thanks in advance.
>
> > > > > > > > Mike
>
> > > > > > > for vector X you just write:
>
> > > > > > > F = find(X<=14);
> > > > > > > X_new = X(F);- Hide quoted text -
>
> > > > > > > - Show quoted text -
>
> > > > > > No.  not number <= 14.  sorry I need to say clearer.
> > > > > > I'd like to find image_ids which are imaged within some dates, say 14
> > > > > > days.
>
> > > > > > Mike
>
> > > > > Im sorry, I cant underytand.
>
> > > > > couldnt you send a clear example please?
>
> > > > > nico- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > > Sorry again.
> > > > Let's say
>
> > > > X=[ id10    2;
> > > >       id2      5;
> > > >       id77     66;
> > > >       id3      3;
> > > >       id8      33;
> > > >       id7      90;
> > > >       id20    91;]
>
> > > > first column is string for image id label; second columns are the
> > > > numbers after datenum (i have simplified them.  I want to find images
> > > > are within some T dates. Let's say T=7 for second column.
> > > > So the output should be:
>
> > > > group1=[ id10    2;
> > > >       id2      5;
> > > >       id3      3]
>
> > > > group2=[      id7      90;
> > > >                     id20    91;]
> > > > Since the numbers in these two groups are within T.
>
> > > > Mike
>
> > > Well, Nico has already told you how to do it.
> > > Did you try what he suggested?
>
> > > First off, you cannot define a matrix as you have where strings and
> > > numbers are mixed.
> > > Most likely, you have two vectors:
> > > X=[3 5 2 20 1 99];
> > > and
> > > id={'id1','id2','id3','id4','id5','id6'};
>
> > > Define a logical index:
> > > indx=X <= 7;
> > > then:
> > > id(indx)  are the data that fit the criterion
> > > id(~indx) are the data that do not fit the criterion.- Hide quoted text -
>
> > > - Show quoted text -
>
> > Thank you for your reply.  But
> > if I try
> > X=[3 5 2 20 1 99 98 66];
> > id={'id1','id2','id3','id4','id5','id6','id7','id8'};
> > indx=X <= 7;
> > id(indx)
>
> > ans =
>
> >     'id1'    'id2'    'id3'    'id5'
>
> > The answer should be
> > 'id1'    'id2'    'id3'    'id5'  'id6' 'id7', since the last two
> > values of X are within the range of 7.
> > sorry, I didn't say it very clearly.
> > I'd like to find values are very close, say within 7.
>
> > Mike
>
> What do you mean, the last two values of X are "within the range of
> 7"?
> They are 98 and 66, which are numbers greater than 7 where I live.- Hide quoted text -
>
> - Show quoted text -

Sorry i've made mistakes. It should be the second-to and third-to
last.

Mike
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Convert angles to 3d image
Next: problem with simulink