Linked Questions

47
votes
2answers
2k views

How do you set attributes on SubValues?

SubValues, as discussed in a previous question, are declared as follows ...
7
votes
1answer
1k views

Difference between variables and functions

Forgive me if this question is very basic; I've learned Mathematica mostly by example. In most programming languages, there is a clear distinction between variables and functions: variables hold ...
3
votes
1answer
223 views

I want to compute the derivative of Black and Scholes option

Good evening to everybody, my question is about computing the derivative of a Black and Scholes option and to draw it. My code is ...
0
votes
0answers
39 views
2
votes
0answers
91 views

Does Mathematica have a method for achieving the same goals that Aspect Oriented Programming does?

I imagine that this question has been asked before, yet I'm not able to find an answer using the form of the question I believe might be asked. Is there a mechanism for duplicating the ...
3
votes
6answers
2k views

Defining an integer-valued function on an integer domain

This should be an easy question! I want to define a function with domain = the 12 integers {1,12}, with the values f[1]=31, <...
0
votes
1answer
57 views

How to erase definition introduced by using Set instead of Equal in Solve [duplicate]

When trying to solve a set of equations, I made a mistake by using = instead of ==. Now when I fixed the mistake, the equation ...
19
votes
3answers
862 views

Generating assignments and transforming code inside held forms when generating code

I have been playing with slightly above trivial code manipulations in Mathematica. I thought Mathematica would be great for this kind of work because of rule replacement and expression manipulation, ...
5
votes
2answers
7k views

Nested If statements

When I do this: Apply[(If[#2 == what, "yay", If[#2 == whoops, "nay"]]) &, {-5, what}] I get: yay But when I do this: <...
1
vote
1answer
477 views

NDSolve memory usage [closed]

I am trying to solve numerically a system of linear ODEs with some quickly varying driving functions. The basic command is: ...
2
votes
1answer
244 views

Syntax f[x_][y_]

Need to understand the principle of the distinction between f[x_,y_] and f[x_][y_] It seems also that z[x_, y_][a_, b_, c_][α_, β_] := a (x + y)^b + c/(α-β) ...
2
votes
1answer
125 views

Clearing Problem with DSolve [duplicate]

Consider: This is a classic mistake (using a single equal sign) that has been discussed on Mathematica Stack Exchange before. I know that Clear[Derivative] will cure the problem. However, consider ...
5
votes
0answers
65 views

How to use the symbols in System`Private`? [duplicate]

Looking at Names["SystemPrivate*"] gives: I'd really like to use and look at the code for some of these symbols, e.g. ...
1
vote
0answers
86 views

How can PowerExpand be made to evaluate the ArcTan form that takes two arguments?

Consider c = Cos[phi]; s = Sin[phi]; ArcTan[c, s] // PowerExpand ArcTan[s/c] // PowerExpand which yields ...
1
vote
0answers
51 views

Creating an indexed set of functions with the indices in the function names [duplicate]

As the titles describes, I want to create a list of functions like the following, where the indices are not in the argument slots: ...

15 30 50 per page