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: search struct array
Replies: 4   Last Post: May 8, 2013 6:25 AM

Advanced Search

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

Posts: 160
Registered: 5/15/11
Re: search struct array
Posted: May 8, 2013 5:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

TideMan <mulgor@gmail.com> wrote in message <70733f86-c302-49fe-960a-9764ceb7e581@googlegroups.com>...
> On Wednesday, May 8, 2013 8:58:08 PM UTC+12, amira ali wrote:
> > "amira ali" wrote in message <kmd11g$p6l$1@newscl01ah.mathworks.com>...
> >

> > > hello
> >
> > > i have struct array and i want to search in this stuct in some motion_pt and return points with all content(size,angle,responce,octave,class_id )
> >
> > > example :
> >
> > > keypoints = 1x38 struct array with fields:
> >
> > > pt
> >
> > > size
> >
> > > angle
> >
> > > response
> >
> > > octave
> >
> > > class_id
> >
> > >
> >
> > >
> >
> > >
> >
> > > motion_pt (want to search about it in struc keypoints)
> >
> > > 96.2519 94.7565 79.3643 86.6593 84.2014 79.5626
> >
> > > 54.0309 57.9461 58.3429 42.9641 55.9402 53.8894
> >
> >
> >
> > plz anyone help me

>
> You're an impatient cove, aren't you?
> Your first post was only 50 min ago.
>
> Do this:
> [dum,indx)=min(abs([keypoints.pt]-96.2519));
> keypoints(indx)


sorry, but i have limited time and thanks for ur reply i need to make that for all motion_pt "so i use for loop"and put the filtered points in strucre array looks like stuct keypoints

m=size(motion_pt,2)
for g=1:m
[dum,indx]=min(abs([keypoints.pt]-motion_pt(1,g)));
keypoints(indx)

end



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

[Privacy Policy] [Terms of Use]

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