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).


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

  • oleg: The author has implemented skewness, kurtosis and checks answering appropriately to the critic.
  • Ashok: how to store 10 or more random number in a loop a loop for i = 1:n mean(i) = input(’enter the mean value...
  • Ben: Doug, Thanks for the very helpful videos! Uitables seem like a convenient way to make a customized property...
  • oleg: Allstats has no checks, no comments and could also be improved (talking about prctile implementatio). Not to...
  • Todd: Additional information and a link to download free MATLAB and Simulink LEGO MINDSTORMS NXT code can be found at...
  • Doug: @Leo, Here is the “English version” of that code. “vec = []” makes an empty variable...
  • leo: Dear Doug I have a question in your code ‘October 9th, 2009 at 13:53′ vec = []; vec = [vec val]; I...
  • Shanker Keshavdas: You sir, are a gentleman and a scholar… No really, helped me out a lot. As to what is...
  • Quan Zheng: how can I get a copy of stepspecs.m?
  • Doug: @Lucy I think this is what you seek to move a line with the mouse in MATLAB. http://blogs.math...

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