File Exchange Pick of the Week

March 18th, 2008

Practical Example: Placing a sampling grid in a polygon part two

This is the second video in this series, it shows you how to run a very simplistic optimization. For a simple problem like this one, the algorithm is more than sufficient to find a correct answer to what size edge is needed set the grid spacing such that the right number of points are placed inside the polygon.

Original example that inspired this video series [Click here]

Part one of this series [Click here]


Video Content

iconFiles.jpgiconPod.jpg

2 Responses to “Practical Example: Placing a sampling grid in a polygon part two”

  1. Tomer replied on :

    Hi
    I was wondering if I could take your example a step forward…
    I like to know if there is a way to now group together the polygon outlines and the pionts inside it so that they’ll be one single object and (this is the main part) to be able to interactivly “pick and hols them” , move the all group together to diffrent part in the figure, drop it there and read out the new coordenates….
    sounds crazy ? do you think it can be done ?
    Thanks in advance
    Tomer

  2. Doug replied on :

    Tomer,

    I think this video is very similar to what you want.

    http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=19162&objectType=FILE

    It allows you to pick up and move a line. This method can be extrapolated to work for this dataset also.

    Doug

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.