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
3
votes
4 answers

Changing values in nested lists according to elements in the list

I have a list of pairs of values in mathematica, for example List= {{3,1},{5,4}}. How do I change the first element (3 & 5) if the second element does not reach a threshold. For example, if the second parts are below 2 then i wish the first parts to…
Mary
  • 788
  • 6
  • 19
  • 43
3
votes
5 answers

Integer optimization in Mathematica?

I have an integer programming problem. I have a pipe, 10m long. I want to cut out as many 1.2meter pieces as I can and then cut the rest of the pipe in 100mm pieces. I have to leave 100mm for the machine to grab. How do I optimize this in…
3
votes
1 answer

How to define a function that commutes with D in Mathematica

I'd like to implement an operator f that commutes with differentiation D. Unprotect[D]; D[f[y___], x] := f[D[y, x]]; Protect[D]; D[f[Sin[x]], x] D[f[Sin[x]] + 1, x] Unfortunately this code produces two different results f[Cos[x]] (* as expected…
user660407
  • 107
  • 7
3
votes
3 answers

Search and replace Greek letters in notebook

I often use Greek letters in my calculations. Is there any way, to replace all occurrences of say ø with µ? From a computational/mathematical standpoint, it makes no difference what the variable name is. But sometimes, we are conditioned to use…
user564376
3
votes
2 answers

Axes numbers interfere with each other

I have a plot in Mathematica, and the problem is: the axes numbers of plot interfere with each other. How can I eliminate the middle numbers, For example, "5*10^12, 5*10^13, ..." and keep the main numbers "1*10^12, 1*10^13, ...". is there any other…
Smtl
  • 49
  • 6
3
votes
1 answer

3D geometry plot in Mathematica

In planar geometry plot question, I asked how to draw planar geometric constructs. Now I want to extend it to 3D. Not only those geometry packages are not doing well, I am also facing quite a few obstacles in Mathematica. Locator is not usable in…
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
3
votes
3 answers

Choice of Software for bug tracking/changes for Mathematica Application Package Development CVS Vs. Bugzilla?

I am developing an application package in mathematica with workbench and it is starting to get complex with multpiple versions and components. I read in some mathematica documentation…
Phil
  • 815
  • 1
  • 8
  • 15
3
votes
1 answer

How Do I Position & Size the Output in a Manipulate Panel in Mathematica?

The following code allows you to play with the values in a Wheatstone Bridge. The output appears to the right of the sliders. How do I make the output panel (expr) appear somewhere else and how do I set a fixed size? (I can only find options for…
terrace
  • 754
  • 2
  • 9
  • 21
3
votes
2 answers

Something wrong with DateString in Mathematica

If I type DateString[{2011, 2, 29, 0, 0, 0}, {"DayName"}] It gives "Tuesday". And also, DateString[{2011, 2, 29, 0, 0, 0}, {"DayName"}] DateString[{2011, 3, 1, 0, 0, 0}, {"DayName"}]
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
3
votes
2 answers

Optimizing Mathematica's main loop

Good day, Reading this thread about performance of pattern matching and functions in Mathematica I was impressed by Timo's idea on optimizing the evaluation of expressions: I have on occasion constructed a Dispatch table of all the functions I …
Alexey Popkov
  • 9,355
  • 4
  • 42
  • 93
3
votes
4 answers

Using Fold to calculate the result of linear recurrence relying on multiple previous values

I have a linear recurrence problem where the next element relies on more than just the prior value, e.g. the Fibonacci sequence. One method calculating the nth element is to define it via a function call, e.g. Fibonacci[0] = 0; Fibonacci[1] =…
rcollyer
  • 10,475
  • 4
  • 48
  • 75
3
votes
6 answers

python/clojure equivalent to mathematica's NestWhileList

Impetus: I was looking for something in python which would get me f([1,2,3]) == [[1,2,3], [2,3], [3]] In clojure, this would just be (nest rest #(not (empty? %)) lst), or it would if we had a nest function. Do we? I'm tired of staring at the…
Ellery Newcomer
  • 1,594
  • 1
  • 11
  • 23
3
votes
1 answer

how to overload Times and Plus for matrix multiplication in mathematica

I want to overload Times and Plus for matrix multiplication in mathematica, for example, let Times be BitAnd, and Plus be BitOr, then do the matrix multiplication. Is there anyway to do this in a simple way, without rewriting my own matrix…
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
3
votes
1 answer

Workaround for \[Conjugate] font bug in Mathematica's linux frontend

Version 8.0.1 of Mathematica has just been released and it didn't fix the bug that has been most annoying me. This is a known bug and WRI promise to fix it "in a future release". Until they do, maybe we can find a workaround. The symbol for…
Simon
  • 14,631
  • 4
  • 41
  • 101
3
votes
3 answers

Show a number with specified number of significant digits

I use the following function to convert a number to a string for display purposes (don't use scientific notation, don't use a trailing dot, round as specified): (* Show Number. Convert to string w/ no trailing dot. Round to the nearest r.…
dreeves
  • 26,430
  • 45
  • 154
  • 229
1 2 3
99
100