Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 12

Questions about the use of built-in Mathematica functions, including pure functions.

1
vote
Write these definitions in a file with the extension .m or .wl. You can create such a file with the menu item New -> Package/Script -> Wolfram Language Package. Then you can load that file (i.e. eval …
answered Jun 1 by Szabolcs
7
votes
Like in all other systems I am familiar with, variable and function definitions exist in memory (RAM) only and do not persist across sessions. If you want a definition to persist, you must save it ex …
answered Mar 15 by Szabolcs
3
votes
One way: myTicks[min_, max_] := Table[ Module[{q, r}, {q, r} = QuotientRemainder[x, 60]; q = Mod[q, 24]; q = IntegerString[q, 10, 2]; r = IntegerString[r, 10, 2]; StringJoin[q, ":", …
answered Feb 21 by Szabolcs
1
vote
The usual term is connected components. You can use Length@WeaklyConnectedComponents[graph]. This will work on directed graphs as well, assuming that you are looking for the components of the underl …
answered Feb 19 by Szabolcs
8
votes
These are different ways to write the same: (f[#] // Print) & Print@f[#] & Print[f[#]] & f[#] // Print & is parsed as (f[#]) // (Print &)—mind the precendence. The following are also effectively …
answered Feb 9 by Szabolcs
2
votes
This is because AssociateTo has the HoldFirst attribute and does not evaluate its first argument before handling it. Even if k=1, it only sees list[[k]] and not list[[1]]. After you understand the H …
answered Sep 12 '18 by Szabolcs
1
vote
-> Rescale@*BetweennessCentrality] The measures you are asking for are available as the following builtin an IGraph/M functions: clustering coefficient: LocalClusteringCoefficient …
answered Jan 15 '18 by Szabolcs
2
votes
If you have the result of the ArrayPlot in a notebook, then you can recover the data. The result will typically be of the form Graphics[Raster[data, ...], ...] See The Structure of Graphics and re …
answered Dec 1 '17 by Szabolcs
4
votes
I can see why this is confusing. Plotting functions try to be too smart, and hide the true way in which they handle their colour functions. Plotting functions typically pass multiple values to their … -> myRainbow[#3])& and will result in an error. The typical way to work with colour functions is to define a function which converts a single number (single argument) to a colour, then build a pure …
answered Nov 24 '17 by Szabolcs
6
votes
To decide whether the behaviour is resonable, let us think about a straightforward way to implement this function. I would do this: Clear[subdivide] subdivide[xmin_, xmax_, n_] := Table[xmin + (xmax …
answered Nov 23 '17 by Szabolcs
4
votes
In a practical scenario, you may be storing your expression in a variable. To be able to do so, it must be held unevaluated. expr = Hold[Plot[x, {x, 0, 1}]] (* Hold[Plot[x, {x, 0, 1}]] *) Then you …
answered Oct 12 '17 by Szabolcs
3
votes
The problem is that the definition of CirclePlus is not distributed to parallel kernels. You can test this using DistributeDefinitions[CirclePlus] (* {} *) ParallelEvaluate[Print@Definition[CircleP …
answered Sep 6 '17 by Szabolcs
9
votes
The other answers ignore that you are asking about C or C++ (not C# or Java!) Mathematica can be called from C (or C++) through the MathLink interface (recently renamed to WSTP). To learn it, I reco …
answered May 12 '17 by Szabolcs
2
votes
At least the following functions make use of VertexWeight WeightedGraphQ returns True both for edge weighted and vertex weighted graphs. Unfortunately, it provides no way to distinguish between …
answered May 5 '17 by Szabolcs
20
votes
In Mathematica, "everything is an expression". All data and code is represented in the same manner, as Mathematica expressions. Thus expressions must be very general. They need to be able to repres …
answered May 2 '17 by Szabolcs

15 30 50 per page