Questions tagged [wolfram-mathematica]

Wolfram Mathematica is a computer algebra system and programming language from Wolfram Research. Mathematica has its own Stack Exchange site at https://mathematica.stackexchange.com/ and that site is the preferred place to ask questions about it.

Wolfram Mathematica is a computer algebra system and programming language from Wolfram Research. The programming language is a term-rewriting functional programming language strongly influenced by . Not to be confused with mathematics ().

Mathematica has its own Stack Exchange site. That is the preferred site for asking questions on this topic.

Tips for asking Mathematica questions

  • Include self-contained source code or a link to a notebook that illustrates the issue
  • Include relevant image, for a graphics related question

A chat room for the tag is available here. It is intended for discussion of some meta-related problems and perhaps some social activity.

Free Mathematica Programming Book


Don't forget to check out our little Tool Bag and add your favorite tricks there.

4457 questions
18
votes
3 answers

Get mathematica to simplify expression with another equation

I have a very complicated mathematica expression that I'd like to simplify by using a new, possibly dimensionless parameter. An example of my expression is: K=a*b*t/((t+f)c*d); (the actual expression is monstrously large, thousands of characters).…
vector07
  • 339
  • 1
  • 3
  • 12
18
votes
6 answers

Mathematica: Rasters in 3D graphics

There are times when exporting to a pdf image is simply troublesome. If the data you are plotting contains many points then your figure will be big in size and the pdf viewer of your choice will spend most of its time rendering this high quality…
jmlopez
  • 4,853
  • 4
  • 40
  • 74
18
votes
4 answers

Importing Google Sketchup models in Mathematica

Google's Sketchup is a nice, simple 3D-object modeler. Moreover Google has an enormous warehouse of 3D objects so that you actually don't have to do much modeling yourself if you aren't particularly gifted in this area. Many of the 3D buildings in…
Sjoerd C. de Vries
  • 16,122
  • 3
  • 42
  • 94
18
votes
6 answers

Import from web - set user agent in Mathematica

when I connect to my site with Mathermatica (Import["mysite","Data"]) and look at my Apache log I see: 99.XXX.XXX.XXX - - [22/May/2011:19:36:28 +0200] "GET / HTTP/1.1" 200 6268 "-" "Mathematica/8.0.1.0.0 PM/1.3.1" Could I set it to be something…
enedene
  • 3,525
  • 6
  • 34
  • 41
18
votes
3 answers

Random rational numbers generation

Rationals are enumerable. For example this code finds k-th rational in open interval 0..1, with ordering that {n1, d1} is before {n2, d2} if (d1
Sasha
  • 5,935
  • 1
  • 25
  • 33
18
votes
2 answers

Preventing evaluation of Mathematica expressions

In a recent SO question three different answers were supplied each using a different method of preventing the evaluation of the Equal[] expression. They were Defer[] Unevaluated[] HoldForm[] Sometimes I still have trouble choosing between these…
Simon
  • 14,631
  • 4
  • 41
  • 101
18
votes
5 answers

Setting up diagnostic error messages in large Mathematica projects

Whenever I create a large Mathematica project I run into this problem: Preventing avalanche of runtime errors in Mathematica, i.e., Mathematica's error message are opaque, archaic, and legion. The idea then is to disable all of Mathematica's own…
Timo
  • 4,246
  • 6
  • 29
  • 42
18
votes
1 answer

Listing all interesting sections of a tetrahedron

Answer update, 12/22: Using Peter Shor's observation that there's a homomorphism between distinct sections and permutations of objects on the cube, list all such permutations by representing a group of cube symmetries as a subgroup of…
Yaroslav Bulatov
  • 57,332
  • 22
  • 139
  • 197
18
votes
6 answers

Call a Mathematica program from the command line, with command-line args, stdin, stdout, and stderr

If you have Mathematica code in foo.m, Mathematica can be invoked with -noprompt and with -initfile foo.m (or -run "<
dreeves
  • 26,430
  • 45
  • 154
  • 229
17
votes
1 answer

Simplify Regular Expression in Mathematica

I recently found out about Kleene algebra for manipulating and simplifying regular expressions. I'm wondering if this has been build into any computational software programs like Mathematica? It would be great to have a computational tool for doing…
Thomas Ahle
  • 30,774
  • 21
  • 92
  • 114
17
votes
1 answer

How can I select one out of several Graphics3D objects and change its coordinates in Mathematica?

In the accepted answer of question " Mathematica and MouseListener - developing interactive graphics with Mma " Sjoerd C de Vries demonstrates that it is possible to select an object in a 3D graphic and change its color. I would like to know if it…
nilo de roock
  • 4,077
  • 4
  • 34
  • 62
17
votes
3 answers

Multiple statements in mathematica function

I wanted to know, how to evaluate multiple statements in a function in Mathematica. E.g. f[x_]:=x=x+5 and then return x^2 I know this much can be modified as (x+5)^2 but originally I wanted to read data from the file in the function and print the…
mrig
  • 382
  • 1
  • 4
  • 21
17
votes
3 answers

Is there a way to clear everything before starting in Mathematica?

In MATLAB there is the function clear to delete all current variables. This is very useful if you start something totally new and don't want to get conflicts with earlier calculations. I'm searching something similar for Mathematica now, but I…
lumbric
  • 7,644
  • 7
  • 42
  • 53
17
votes
2 answers

Exporting Mathematica Print[] Output to a .txt file

I have a large Mathematica notebook that uses Print[] commands periodically to output runtime messages. This is the only output (aside from exported files) that this notebook generates. Is there any way I can automate the export of this output to a…
paradox09
  • 171
  • 2
  • 4
17
votes
2 answers

Hold any argument

Is it possible to define a function that holds arguments at given positions ? Or to do something like HoldLast as a counterpart to HoldFirst ?
faysou
  • 1,142
  • 11
  • 25