×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

for loop

for loop

for loop

(OP)
Hello,
I wrote the code for image processing purpose.  First, i already labelled my image edges with number, let's say from 1 to 10.  Next using the imfeature in Matlab, i want to find the centroid for each mass.  The problem is, when i stated, edgeim==1, it found 2 centroid, and when i stated edgeim==2, it found 1 centroid.  So, i replace this manual steps with a for loop, for i=1:2. The weird thing is, i get 12 centroid points instead of 3. Why ?? anyone can help ?

regards,
susie

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources