0
|
5211 Views
|
4 Replies
|
7 Total Likes
View groups...
Share
GROUPS:

# #, {}, &/@ and other strange syntaxes

Posted 11 years ago
 Dear,I was reading the Wolfram Demonstrations Source Code from http://demonstrations.wolfram.com/CubicEquation/. I see many stranges commands and I would like to know where could I learn  them. I typed bellow part of the CDF file. Could you help me?.....If[Flatten[#]=={},{}, Point[{#,Function[x,a3 x^3+a2 x^2+a1 x+a0][#]}]&/@{x/.#}]&[{ToRules[Quiet@Reduce[a3 x^3+a2 x^2+a1 x+a0==0,Reals]]}],.....Thank you,Ana
4 Replies
Sort By:
Posted 11 years ago
 Beginning documentation on most of these "runic forms" is available through "?". When used in the Mathematica Front End, there is a blue >> that links to the main reference page on the item.  In[1]:= ? &                                                                              Function[body] or body &        is a pure function. The formal parameters are # (or #1), #2, etc.  Function[x, body] is a pure function with a single formal parameter x.  Function[{x1 , x2 , }, body]       is a pure function with a list of formal parameters.   In[2]:= ? /.                                                                            expr /. rules  applies a rule or list of rules in an attempt to transform each subpart of     an expression expr. In[3]:= ? /@                                                                            Map[f, expr] or f/@expr applies f to each element on the first level in expr.       Map[f, expr, levelspec] applies f to parts of expr specified by levelspec.
Posted 11 years ago
 There's a guide here:  http://mathematica.stackexchange.com/a/25616
Posted 11 years ago
 In Mathematica helpFor # and & look up FunctionFor /. look up ReplaceAllFor @ look up PrefixFor {} look up ListThere are lots of other one or two character aliases for other Mathematica functions and it can take some practice to recognize those.There are also the issues of determining exactly what is and is not included when a function, that uses [ and ] to show you what is included, is turned into an operator where it may not be nearly as clear. This brings in all the issues of precedence. It is possible to use ( and ) to make it clear what is included, but this is often not done.
Posted 11 years ago
 May I suggest the documentation?http://reference.wolfram.com/mathematica/guide/Mathematica.html:-)