Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • $\begingroup$ Thank you! I gave your code a try...from attempting to read/understand it...A is a count (list) of which lines are inside which squares? I'm not sure the given values can be true...When running the code several times the results ( changed RandomReal to 1-4 ) are generally less than 1. I would expect the means in all squares to be atleast 1 or higher. $\endgroup$ Commented Apr 11, 2018 at 8:25
  • $\begingroup$ The results change because the lineweights were randomized. I changed thit. means[[i]] belongs to reactangle[[i]]. I also added a plot. $\endgroup$ Commented Apr 11, 2018 at 8:42
  • $\begingroup$ Ahh I think maybe there is a confusion in my description. If in this case each lineweight is equal to one, and in each square, every segment of line is also equal to one, and an average of each is built, for example in the bottom left corner, it has 8 line segments, each value one, so 8*1 / 8....I expect 1 as the mean.... It looks here that the density of line partitions within each square goes up as we reach the centre, which makes sense, but unfortunately not the means I'm looking for :( But thank you! $\endgroup$ Commented Apr 11, 2018 at 8:55
  • $\begingroup$ Maybe it's means = Map[Mean[DeleteCases[#, 0.]] &, lineweights A] then? $\endgroup$ Commented Apr 11, 2018 at 9:20