Questions dealing with optional named arguments of Mathematica functions.
61
votes
4answers
1k views
How can one find undocumented options or option values in Mathematica?
Mathematica has a lot of undocumented or poorly documented options.
How does one go about working out if there is an undocumented option that might solve a particular problem?
How does one work out ...
32
votes
2answers
805 views
Extract values for ViewMatrix from a Graphics3D
Under More Information in the help page of ViewMatrix the following entry can be found
With the setting ...
48
votes
4answers
2k views
Functions with Options
Suppose you want to create a function which has optional arguments.
Maeder's book "Programming in Mathematica" covers the topic extensively up to version 3, but some things have changed/evolved since ...
28
votes
3answers
699 views
How to find out which method Mathematica selected?
There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
9
votes
1answer
391 views
How to tell mathematica not to resolve stiffness issues
Very often I solve partial differential equations that are nonlinear and could be up to 4th order. In these cases, it is usual for the solution determined by ...
26
votes
6answers
985 views
How can I create a function with optional arguments and options?
Is it possible to create a function with optional arguments that also takes options?
Here is a simple example. I have a function f with option "g". It also has ...
16
votes
3answers
248 views
How can I work out which functions work with SetOptions?
Not all functions seem to work with SetOptions. e.g.
...
14
votes
2answers
1k views
How to save plots in grayscale
As sophomoric as this question seems, how should I save plots in grayscale in Mathematica?
I generally like eps images for their scalability and I use ghostscript or other third party perl scripts ...
11
votes
2answers
339 views
About number truncation of ticks display in ListPlot
In my problem, I need to plot a figure in a relatively small region of the $x$ axis, e.g.,
...
7
votes
2answers
324 views
Solving/Reducing equations in $\mathbb{Z}/p\mathbb{Z}$
I was trying to find all the numbers $n$ for which $2^n=n\mod 10^k$ using Mathematica.
My first try:
Reduce[2^n == n, n, Modulus -> 100]
However, I receive ...
10
votes
2answers
373 views
Factorizing polynomials over fields other than $\mathbb{C}$
I'd like to take a polynomial in $\mathbb{Z}_5[x]$ of the form $ax^2+bx+c$ and factor it into irreducible polynomials.
For example:
Input...
x^2+4
Output...
...
4
votes
1answer
558 views
Fixed color scale in multiple density plots
I think there should be a simple solution for my current problem, but neither StackOverflow (or the help of Mathematica) or Google have it.
I have to plot multiple density plots with a color ...
4
votes
2answers
271 views
Evaluating an If condition to yield True/False
I would like to decide whether an option passed to my custom function has the value Automatic or something else. This is my attempt:
...
9
votes
3answers
272 views
Dealing with nested options
OptionValue allows for recent versions of Mathematica (I think as from 7) to easily access optional parameters if they are explicitely given to a function or their default values otherwise.
For big ...
18
votes
2answers
181 views
Evaluation of OptionValue[]
I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
11
votes
3answers
595 views
Number format of axes in a plot
How can I have a conditional format of the values appearing in the axis of a plot ?
I have in mind the number format options available in Excel for plots as described here ...
4
votes
1answer
156 views
Is there a way to globally set when to treat a very small number as zero?
I understand that I can use Chop to force a very small number to be treated as 0 and can use ...
7
votes
2answers
287 views
Why does ListPlot ignore some global options?
Why does the following plot no use the global PlotMarkers option?
...
10
votes
3answers
469 views
Passing down arguments
In R, one can use ... to pass arguments down to another function. For example
...
15
votes
3answers
363 views
How can I set Grid alignments using numbers?
There is an example in the Alignment documentation (it also appears in the Grid documentation):
...
10
votes
2answers
561 views
Labels and tickmarks inside Frame
Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider,
...
9
votes
2answers
197 views
Determining the default Method used in optimization and root-finding algorithms
Is it possible to extract the Method which is used in functions like NMinimize, FindRoot, ...
7
votes
1answer
189 views
What does MaxStepFraction do?
I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
6
votes
1answer
200 views
Running an initialization cell on Mathematica start up
I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into ...
6
votes
2answers
424 views
How to set the NDSolve method to LSODA
I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...
3
votes
2answers
257 views
X label in GraphicsColumn is cut off
I'm trying to use GraphicsColumn to plot two curves with very different ranges. for example,
...
9
votes
2answers
119 views
Function with custom Options and modified Options for built-in Symbols
I couldn't find a more descriptive title, but I guess an example will explain my problem.
I set up some customized Grid function including some additional ...
9
votes
1answer
940 views
What method does NDSolve use for solving PDEs?
What is NDSolve's mode of operation?
I use it to solve partial differential equations and never gave it too much thought. Recently, I came across this question. ...
7
votes
1answer
229 views
Setting the DifferenceOrder Option
I've been playing around with Method in NDSolve[...] and can't quite seem to figure out how to force ...
5
votes
2answers
127 views
How is OptionsPattern[] defined? Can I replicate this?
I am writing several functions which all take similar input parameters (a complicated nested list structure). Is there some way for me to define a pattern that can be used in multiple places and ...
3
votes
1answer
71 views
How to grab CellTags from a Cell?
I am in the process of creating a palette for a specialised "Save as HTML". For context please see this.
How can I grab the CellTags from a Cell[...] object? This is my first iteration, aka testing ...
