0
votes
0answers
29 views

Use Map with OptionValue [duplicate]

Trying to map OptionValue to a list of option names doesn't work. ...
1
vote
1answer
160 views

Which methods are available for NMinimize? [closed]

I can't find in the documentation the list of methods available to NMinimize[]. Is there a way to get this? The NMinimize page in Documentation Center mentions only ...
0
votes
1answer
95 views

How to make an index optional?

Can I define a relation between variables, such that the expression will also be evaluated (then assuming all indices are equal) when no index is given? $$ x_i + y_j = \delta_{ij} ...
3
votes
1answer
179 views

Evaluating function only when its optional argument is numeric

I want to have the argument 'a' for myf2 in form of optional argument, but at the same time I need to evaluate the function only if 'a' is Numeric, see also my previous question. ...
9
votes
4answers
198 views

Is it possible to separately call the default value of a variable which isn't at the end of the sequence?

After reading this post I recalled an old question I once met. We know that we can set default values for variables of a function: ...
2
votes
1answer
94 views

How can I define a function taking two distinguishable sets of options?

It commonly happens that one wants to define some function foo which in turn calls some other function (e.g., Plot) that can ...
2
votes
0answers
86 views

How can this function's options be used in different places?

I wrote this function to make a ListPlot where the points are colored by a third argument. ...
36
votes
6answers
2k 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 ...