« first day (3467 days earlier)      last day (1315 days later) » 

05:11
@MichaelE2 I had the same thing happen so I went back and only voted for a few and those stuck
I assume it's a serial voting thing
 
6 hours later…
11:34
@JimB This doc page lists several functions to characterize spatial point distributions under "homogeneity measures". I am wondering if you are familiar with these, and if yes, can you recommend a good resource to learn about them?
It's clear what they are just from the Mathematica docs, but I assume there are some useful theoretical results / theorems / relations between these functions, or guides on interpretation. This is what I am looking for.
If I recall correctly, this might be close to your expertise, forgive me if I misremember :-)
 
2 hours later…
13:34
Hi all! I have an inputlist of two-element lists like i={{1,2},{3,1}} and I want to construct a function F[] that produces a one-element list using the first element of the input list-elements as the list index and the second-element as the new element of the list, the second argument shall be the total number of elements of the resulting list: like F[i,4]={2,0,1,0}. What is the syntactically simplest/shortest way to do that?
13:48
@RaphaelJ.F.Berger Can you rephrase "produces a one-element list using the first element of the input list-elements as the list index and the second-element as the new element of the list", I don't really understand
I don't really see what relationship your example i and the output of F[i,4] have
F[{{1,2},{3,1}},4] = {2,0,1,0}
there is the list of two element-lists {{1,2},{3,1}} and I want to "convert" that into a list where the 1st entry is 2 and the third entry is 1
Aaaah!
I get it now, thank you
In a sense you interpret the input list as x/y coordinates: {{x,y}, ...
Thank you for your interest!
and the output list gives just the values at the position of the entry number
The second parameter "4" should just give the total number/length of the output list.
F[l_, n_] := Normal@SparseArray[First /@ l -> Last /@ l, {n}]
Actually I think i[[All, 1]] and i[[All, 2]] is probably neater:
F[l_, n_] := Normal@
  SparseArray[l[[All, 1]] -> l[[All, 2]], {n}]
(It's also about one tenth quicker on my machine.)
Wow thank you very much!!
14:00
... or you could do Normal[SparseArray[First /@ l -> Last /@ l]][[;; n]] so that something like i={{99, 1}} won't break it
Lots of options :)
Thank you very much!!! I have one more (sorry) Now I want to "convert" this List/Array into real valued step function. where the list element positions encode the x-intervals say 1st entry is from 1<x=<2 and the value of the entry is the y-value
 
3 hours later…
17:22
@Szabolcs I know of such measures and use the only occasionally (not because those measures aren't useful but only because the subject matter I concentrate on doesn't have the need for those come up often). One practical article (and maybe "practical" is in the eye of the beholder) is ncbi.nlm.nih.gov/pmc/articles/PMC2726315.
Also, Ripley's very good introductory book on Spatial Statistics (which to date me I remember when it first came out) is in free pdf form at onlinelibrary.wiley.com/doi/book/10.1002/0471725218.
17:55
@RaphaelJ.F.Berger Sorry, unfortunately that lies beyond my education :)
@RaphaelJ.F.Berger Another option that's slightly shorter is the following: (same general idea as the solution from @CarlLange)
F[l_, n_] := Normal@SparseArray[Rule @@@ l, {n}]
@RaphaelJ.F.Berger Something like this?
F[l_, x_] := Total[UnitBox[x - # - 1/2] #2 & @@@ l]

F[{{1, 2}, {3, 1}}, x]
(* 2 UnitBox[3/2 - x] + UnitBox[7/2 - x] *)

Plot[F[{{1, 2}, {3, 1}}, x], {x, -2, 5}, Filling -> Bottom]
 
2 hours later…
19:43
@JimB Thanks @JimB, these are great recommendations, especially the book! It might be precisely what I was looking for.
19:58
@LukasLang Exactly this! Thank you very much, again!
@LukasLang This is much nicer than my solutions! It seems I still have a long way to go :)

« first day (3467 days earlier)      last day (1315 days later) »