67,458 reputation
5164380
bio website szhorvat.net/pelican/pages/…
location ND
age
visits member for 3 years, 2 months
seen 4 hours ago

contact details

Please do not write me with Q/A related questions. Post them on the site instead!

Visit Mathematica.SE


Jan
27
comment Pairwise distances of points and classification using GraphDistanceMatrix
@belisarius It seems I'm particularly stupid today. Does it look fine now?
Jan
27
revised Pairwise distances of points and classification using GraphDistanceMatrix
added 124 characters in body
Jan
27
revised Pairwise distances of points and classification using GraphDistanceMatrix
deleted 315 characters in body
Jan
27
answered Pairwise distances of points and classification using GraphDistanceMatrix
Jan
27
comment Intersection does not take list of lists
@Leonid I agree that there are several reasons for Total, another one is being able to control whether to use compensated summation or not, and yet another one is an easy syntax to sum ("collapse") n-dimensional tensors along any direction.
Jan
27
comment Plot3D region bounded by equations?
These surfaces partition space into several segments. To select the one you need, you must rewrite them as inequalities, not as equations. Then it's trivial to plot the region using RegionPlot3D.
Jan
27
comment Intersection does not take list of lists
@LBogaardt I guess it's because a set could have elements that are lists, and Apply solves the problem easily anyway. Recent versions of Mathematica have specialized functions for many small tasks, such as Total, but older versions were more minimalist and you had to implement things by combining more primitive functions. For example instead of Total[a] we used Plus @@ a.
Jan
27
comment Intersection does not take list of lists
@LBogaardt Not at all. When you get used to Mathematica, Apply will be one of the fundamental tools you will use every day. This is a nice tutorial that's worth a look.
Jan
27
answered Intersection does not take list of lists
Jan
26
comment Generating social network graph from a CSV file
Use AdjacencyGraph to convert an adjacency matrix to a Graph object. If you have trouble with some other step, such as reading the data into Mathematica, please make the question specific to that step.
Jan
26
answered Generating a random tree of given cardinality, depth, and labeling
Jan
26
comment Generating a random tree of given cardinality, depth, and labeling
Also, do you have any requirements on the distribution that the trees are drawn from? For example, do you need all trees satisfying your requirements to be drawn with equal probability (i.e. have a uniform distribution on the set of allowed trees)? If yes, that makes the problem considerably more involved, and I'd suggest first figuring out a method (e.g. asking on Math.SE) and thinking about a Mathematica implementation only afterwards. The naive algorithm I described probably won't give you a uniform distribution.
Jan
26
comment Generating a random tree of given cardinality, depth, and labeling
Naive iterative approach: Have all nodes in the graph be labelled with their level (depth). 1. Select a random node. 2. If its depth is $< D$, then attach a new node to it. Repeat this until you have $N$ nodes. When you're done, name the nodes with the words from the text using DepthFirstScan. You can try to code this in Mathematica.
Jan
26
comment Graph stories, 3-d volumes
@Pickett It appears that the crash is related to the Dynamic RevolutionPlot somehow. If you delete the Dynamic expression (so it's no longer visible in the notebook), it doesn't crash any more.
Jan
26
revised Graph stories, 3-d volumes
added 129 characters in body
Jan
26
comment Graph stories, 3-d volumes
@Pickett Yep, there were two problems which I fixed now. They didn't always show up depending on how you edited the vase. Unfortunately it still often crashes the kernel in v9. Doesn't crash in v8.
Jan
26
revised Graph stories, 3-d volumes
added 2 characters in body
Jan
26
revised Graph stories, 3-d volumes
edited body
Jan
26
comment Graph stories, 3-d volumes
@Pickett works fine here, just tried it. 9.0.1 OS X.
Jan
26
answered How to normalise a line in mathematica