Reputation
72,241
Next tag badge:
595/400 score
76/80 answers
Badges
5 179 407
Newest
 Enlightened
Impact
~849k people reached

34m
comment Graph, overlapping vertexlabels
... their relative ratio as well as $\alpha$ to get more spacing between nearby nodes. Some documentation for the method's suboptions is available near the bottom of this page.
36m
comment Graph, overlapping vertexlabels
Unfortunately there's no builtin method that will try to avoid overlap. The graph layout methods consider the nodes to be points and ignore the labels. They also ignore the size of the vertices, as far as I know (i.e. they're considered to be points even if they are large disks or rectangles). What you can also try is playing with the parameters of the SpringElectricalEmbedding. The interaction has a spring-like part ($k_1 r$ potential) drawing the nodes together, and an electrical-like part ($k_2 r^{-\alpha}$) keeping some sort of minimal distance between them. You can try to adjust ...
14h
comment Keeping a plot fixed as one parameter changes in Manipulate
I'll take a look tomorrow. I don't know that off-hand. I have to search the docs. The keyword is ControlActive. I'm not even 100% sure it's possible using documented functionality (though it likely is).
16h
comment Keeping a plot fixed as one parameter changes in Manipulate
For this specific case you can put PerformanceGoal -> "Quality" in the ContourPlot. This will prevent slider movement from affecting the ContourPlot. If you have two sliders and two plots, and you wanted the first slider to affect the quality of the first plot, but not the second, and you wanted the second slider to affect the quality of the second plot but not the first, then it would likely be quite a bit more complicated ...
16h
comment Reset Options to Default
The same idea applies. You can get the default options form a subkernel and set them (Options[sym] = ...).
16h
comment Reset Options to Default
"A similar question concerning Attributes has been asked here, what does not seem to help me." <-- Why not?
17h
comment Contourplot fails to plot x==0 if plot range is from 0
I do understand that some function are simply not defined outside of the boundary, but for others PlotRange should be a good workaround.
17h
comment Contourplot fails to plot x==0 if plot range is from 0
ContourPlot subdivides the region into smaller and smaller parts to localize the contour. It's a good idea to make sure that any feature you need discovered by ContourPlot should be in the inside of the region, not on the boundary. What is shown in the figure can always be restricted using PlotRange later. Use PlotRange to control what is shown, use the x and y bounds to control what is computed.
18h
comment Trainable WEKA segmentation of images
Fiji being a Java library, maybe you can access it though J/Link
18h
comment What function generates random numbers in a compiled function?
@Felix Extracting an element from an array, i.e. numbers stored sequentially in memory in a flat format, takes the same amount of time regardless of the size of the array.
19h
comment What function generates random numbers in a compiled function?
@Felix You can make C++ functions accessible from Mathematica through LibraryLink. This does take a bit of work, but once you've got used to it it's not so bad. This is now the usual way for me to call C++ code (I hate writing to files using newly invented formats and importing the data back). Of course if it's fast enough in pure Mathematica that's much less trouble.
20h
comment What function generates random numbers in a compiled function?
That said, your question is valid and interesting, but given your motivation for asking it: I'd just use a C++ library.
20h
comment What function generates random numbers in a compiled function?
Why don't you use a C++ library, e.g. Boost.Random? It is not generally true that rand() from the C standard library is not good enough. Some implementations are good, some are not so good. The problem is that the implementation you get depends on the system/compiler you use. If you use Boost.Random or a similar library you'll know which precise implementation you have and you'll even have a choice of several different implementations.
22h
comment Multiplying three matrices does not give expected form
Yes, it's a generalized scalar product that works between arrays/tensors of any dimension, not just matrices. For matrices it's equivalent to matrix multiplication. Contrast this with e.g. MATLAB, which originally supported only matrices and nothing else. MATLAB still doesn't support vectors (1D arrays), only row-matrices or column-matrices. Mathematica does have true 1D arrays and doesn't have the strict matrix-oriented view that MATLAB takes.
22h
comment Multiplying three matrices does not give expected form
One needs to be careful when just typing classical mathematical notation into Mathematica. Sometimes Mathematica can interpret it, sometimes it can't. When it can, it might not use the interpretation you meant. It's better to treat any Mathematica input as program code, not human-readabale mathematical notation, and use unambiguous notations. The palettes are for mathematica notation mostly. But in this case the only change necessary is . really, the matrix notation is not harmful in any way.
22h
comment Multiplying three matrices does not give expected form
The problem is that * is element by element multiplication and only works for arrays of the same dimensions. . (i.e. Dot) is used for matrix multiplication. Using $1\times n$ and $n\times 1 $ matrices for row and column vectors is not a problem, but not necessary either. For a vector you can just write {x,y,z} and not distinguish between row and column vectors. The order of multiplications (vec.mat vs mat.vec) determines what will be done.
22h
comment Multiplying three matrices does not give expected form
You need to post Mathematica code, not LaTeX. Otherwise it's impossible to tell what's going wrong. Also be sure to type "matrix multiplication" in the documentation search box and see what comes up.
1d
comment Median of Dataset in Mathematica 10
Another way is Transpose[dataset][All, Median].
1d
comment Median of Dataset in Mathematica 10
This kind of makes sense because the median is defined based on ordering of the elements. Vectors cannot be ordered, thus mathematically the median of vectors makes no sense. Median does have the convenient behaviour that for a list of vectors Median[list] gives Median /@ Transpose[list] though.
1d
comment Simple ways to implement vector dilation
@Rahul Thanks again, I managed to come up with a robust solution by making some minor modifications to your line. I'll post later tonight when I get the time.