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

Getting order of magnitude in Mathematica

Is there a way to obtain the order of magnitude of a number in Mathematica? E.g. 200 would have an order of magnitude of 2.
wrongusername
  • 18,564
  • 40
  • 130
  • 214
3
votes
1 answer

Unexpected Remove::rmnsm error when trying to Remove Temporary Symbol

Good day, Consider the following: In[1]:= HoldComplete[With[{line=a},Null]] Names["`*"] Attributes/@Names["`*"] Remove/@Names["`*"] Out[1]= HoldComplete[With[{line=a},Null]] Out[2]= {a,line,line$} Out[3]= {{},{},{Temporary}} During evaluation of…
Alexey Popkov
  • 9,355
  • 4
  • 42
  • 93
3
votes
1 answer

Make string manipulation more convenient in Mathematica

With Mathematica I always feel that strings are "second class citizens." Compared to a language such as PERL, one must juggle a lot of code to accomplish the same task. The available functionality is not bad, but the syntax is uncomfortable. While…
Mr.Wizard
  • 24,179
  • 5
  • 44
  • 125
3
votes
1 answer

How does Mathematica create an InterpolatingFunction object?

How does Mathematica create an InterpolatingFunction object? Example: test1 = FunctionInterpolation[Sin[x],{x,0,2*Pi}] The FullForm of test1 is long, but is primarily x values with the corresponding y values. However, the interpolation is not…
user354134
3
votes
2 answers

How to substitute functions and Full Simplify in Mathematica?

I have the following function -((A N1 P (A B k (a N1 + aa P - r) + a aa (b B - bb) k R + 2 A B r R))/k) -- (1) This function can be rewritten as: - A R P N1 d/k --- (2) where: R is (k (aa B m - a mm + A B r))/(a aa (b B - bb) k + A B r) P is (-a^2…
Rspacer
  • 2,369
  • 1
  • 14
  • 40
3
votes
5 answers

Adding the last two elements of a list

In Mathematica, what is the cleanest way of taking a list {r1, r2, r3, ..., rn, a, b} and returning {r1, r2, r3, ..., rn, a + b} or more generally {r1, r2, r3, ..., rn, f[a, b]} for some function f?
Simon
  • 14,631
  • 4
  • 41
  • 101
3
votes
0 answers

How do I integrate numerically a function in Python?

I'm trying to write a Python code (based on a Mathematica notebook) that includes some integrations, but I had no luck so far. The integral I'm trying to evaluate is: where, *It's for Bjorken-Mtingwa Intra-beam scattering calculations. In Python,…
Michalis Z
  • 51
  • 6
3
votes
1 answer

Puzzled by Function body evaluation

I am puzzled by the following behavior of Function: In[1]:= InlineCellInMessage=Function[expr,DisplayForm[Cell[BoxData[MakeBoxes[expr,StandardForm]],"Input"]],{HoldAllComplete}] Out[1]= Function[expr,MakeBoxes[expr,StandardForm]] I expected to see…
Alexey Popkov
  • 9,355
  • 4
  • 42
  • 93
3
votes
1 answer

Moving an AutoCad DXF solid along a 3D path in Mathematica

I came across this post and found belisarius' answer interesting. Wondering whether he someone can post his complete mma code and give some explanation. In general, my question is about how to achieve this kind of annimation/plotting behavior in…
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
3
votes
2 answers

Can one extend the functionality of PDF, CDF, FindDistributionParameters etc in Mathematica?

I've started doing more and more work with the new Mathematica statistics and data analysis features. I attended the "Statistics & Data Analysis with Mathematica" online seminar on Tuesday (great presentation, I highly recommend it) but I've run…
Jagra
  • 3,149
  • 1
  • 18
  • 19
3
votes
1 answer

how to store the output of Minimization

I minimize a multivariable function in Mathematica using Minimization. It works fine. I want to pass the output of the Minimization to variables in order to use them ahead. But I am missing something. Let's see it (the Etet function is defined…
geom
  • 195
  • 8
3
votes
1 answer

Building Application Packages with multple packages and references in Mathematica

I am building an application package in Mathematica. The application contains multiple packages and refers to other application packages To set everything up, I have used and followed the application packages instructions of the help section of…
Phil
  • 815
  • 1
  • 8
  • 15
3
votes
2 answers

Using Solve in Mathematica

To get acquainted with Mathematica's solving functions, I tried to work out a solution to a MinuteMath problem: There is a list of seven numbers. The average of the first four numbers is 5, and the average of the last four numbers is 8. If the…
Karsten W.
  • 17,826
  • 11
  • 69
  • 103
3
votes
1 answer

Need help with avoiding lists in condition or pattern tests

How can we use a conditional or pattern test to make our function accept any symbols as input except for lists?
Sunday
  • 87
  • 2
  • 8
3
votes
2 answers

Techniques for Minimization over Integers

I have to minimize a bunch of functions of n variables that can take values from an integer range. The functions have the general form: f[{s1_,... sn_}]:= Kxy KroneckerDelta[sx,sy] + Kwz KroneckerDelta[sw,sz] +/- .. Where the Kmn are also…
Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190