Prev: Saving data after running parallel simulations
Next: ??? Attempt to reference field of non-structure array.
From: xiong on 22 Jan 2010 02:01 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <c4aa4eca-097f-4eeb-9f03-f1c328470f72(a)b35g2000vbc.googlegroups.com>... > On Jan 21, 1:27 pm, "xiong " <xionglei092...(a)sina.com> wrote: > > > But I can not tell the matlab to calculate the distance from each > > centroid to the two nearest centroids and decide which to throw away > > > if the distances are too small. > > > > Look forward to your patient teaching. > > Thank you. > > ----------------------------------------------------------------------- > The distance is merely the difference between the indexes where the > centroids are. For example if one has a centroid at element 5 and > another had a centroid at element 15 then they are 10 elements apart. > It's up to you to decide how close is "too close." Thank yuu.If two centroids are 5 elements apart, I think it is "too close",then I choose the bigger value.Which function should I use to tell Matlab to do this?
From: ImageAnalyst on 22 Jan 2010 06:18 Well, the "if" function comes to mind if distanceApart < minAllowableDistanceApart % Code to throw away one of the two centroid locations end
From: xiong on 22 Jan 2010 06:35 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <56705f16-d25a-4c26-a742-324c67178332(a)a32g2000yqm.googlegroups.com>... > Well, the "if" function comes to mind > if distanceApart < minAllowableDistanceApart > % Code to throw away one of the two centroid locations > end Thank you for your kindness and patience. But I can not program it . Would you like to write some matlab code ? Sorry if I take your time.
From: ImageAnalyst on 22 Jan 2010 09:43 On Jan 22, 6:35 am, "xiong " <xionglei092...(a)sina.com> wrote: > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <56705f16-d25a-4c26-a742-324c67178...(a)a32g2000yqm.googlegroups.com>... > > Well, the "if" function comes to mind > > if distanceApart < minAllowableDistanceApart > > % Code to throw away one of the two centroid locations > > end > > Thank you for your kindness and patience. > But I can not program it . > Would you like to write some matlab code ? > Sorry if I take your time. -------------------------------------------------------------------------------------------------------------------- Yes you can. I have confidence in you. Once you read the "Getting started" documentation, watch a few of the MATLAB video tutorials, and do some of the other self-learning opportunities they provide, you'll be programming miracles just like the hundreds of thousands of the rest of us. It just seems hard at first. Just dedicate some time to learning the basics and you'll be on your way. Even if I wrote that little script for you, you can't really do much with it. You'd then be wanting more and more MATLAB code, since I'm sure this is not the final extent of what you'll need in MATLAB. Please recall the old Chinese man/fish proverb.
From: xiong on 22 Jan 2010 10:37 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <a49abd4b-7577-4451-abaf-4d7353a99089(a)c34g2000yqn.googlegroups.com>... > On Jan 22, 6:35 am, "xiong " <xionglei092...(a)sina.com> wrote: > > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <56705f16-d25a-4c26-a742-324c67178...(a)a32g2000yqm.googlegroups.com>... > > > Well, the "if" function comes to mind > > > if distanceApart < minAllowableDistanceApart > > > % Code to throw away one of the two centroid locations > > > end > > > > Thank you for your kindness and patience. > > But I can not program it . > > Would you like to write some matlab code ? > > Sorry if I take your time. > > -------------------------------------------------------------------------------------------------------------------- > Yes you can. I have confidence in you. Once you read the "Getting > started" documentation, watch a few of the MATLAB video tutorials, and > do some of the other self-learning opportunities they provide, you'll > be programming miracles just like the hundreds of thousands of the > rest of us. It just seems hard at first. Just dedicate some time to > learning the basics and you'll be on your way. Even if I wrote that > little script for you, you can't really do much with it. You'd then > be wanting more and more MATLAB code, since I'm sure this is not the > final extent of what you'll need in MATLAB. Please recall the old > Chinese man/fish proverb. Thank you!I will make it by myself. Thank you for your kindness and patience.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Saving data after running parallel simulations Next: ??? Attempt to reference field of non-structure array. |