MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

Loading MAMBO Toolbox

The MAMBO toolbox syntax differs between the various systems it works with: Maple, MuPAD, and Mathematica. Some general differences in expressions between these systems are outlined below.

Maple MuPAD Mathematica
cos(t) cos(t) Cos[t]
This difference is shared by sin and other trig functions, where parentheses are also converted to brackets and the function name is capitalized between Maple & MuPAD and Mathematica.
AngularMomentum(A,b) AngularMomentum(A,b) AngularMomentum[A,b]
With the exception of parentheses used to show the order of executing operations, anywhere with parentheses or brackets in Maple or MuPAD is generally changed to brackets and braces, respectively, in Mathematica.
2 &** v or &**(2,v)
w &xx v or &xx(w,v)
w &oo v or &oo(w,v)
w &-- v or &--(w,v)
w &++ v or &++(w,v)
(v&>w)
(v&>=w)
(v&<w)
(v&<=w)
(v&==w)
(v&!=w)
Express(v,a)
Simplify(v)
2 &** v or &**(2,v)
w &xx v or &xx(w,v)
w &oo v or &oo(w,v)
w &-- v or &--(w,v)
w &++ v or &++(w,v)
(v&>w)
(v&>=w)
(v&<w)
(v&<=w)
(v&==w)
(v&!=w)
Express(v,a)
Simplify(v)
2~MamboTimes~v or MamboTimes[2,v]
w~MamboCross~v or MamboCross[w,v]
w~MamboDot~v or MamboDot[w,v]
w~MamboMinus~v or MamboMinus[w,v]
w~MamboPlus~v or MamboPlus[w,v]
(v>w)
(v>=w)
(v<w)
(v<=w)
(v==w)
(v!=w)
MamboExpress[v,a]
MamboSimplify[v]
The first five functions above are for vector algebra, while the six after that are boolean operators used during the MotionOutput command for exporting a MAMBO motion description. Whereas in Maple and MuPAD the time variable is automatically t, although it can be changed in the Geometry or Motion Output function, in Mathematica it must be defined by the command SetTime[t], or SetTime[wrist], to define a time variable.
DefineObjects([A,'Sphere',radius=1]) DefineObjects([A,`Sphere`,radius=1]) DefineObjects[{A,"Sphere","radius"=1}]
Note once again that parentheses and brackets are changed to brackets and braces. In addition, while the apostrophe to the right of the semicolon key is used in Maple, the apostrophe above Tab is used in MuPAD, and quotations are used in Mathematica around the type of object. In addition, the options, such as radius, color, and orient also found in DefineObjects are surrounded by quotations in Mathematica if they are written with letters and are not numerical values, such as "theta", "red", and "xlength".
In MuPAD, greek letters such as theta and psi may not function properly and need to be shortened to th or ps if used as variables.
Undo(): Undo(): Undo;
In Maple and MuPAD, a colon after a command will execute it and a semicolon will execute it and then provide output, while in Mathematica a semicolon after a command will execute it without output while the absence of a semicolon or colon will execute it with output, for the commands that even have output at all. In Maple and MuPAD, commands including NullVector, Restart, and Undo require parentheses after them to operate. In Mathematica, these functions may have [] after them, but work fine without that either.
[Maple]DeclarePoints(N,B,P,seq(seq(cat(E,i,j),i=1..3),j=1..4)):
[MuPAD]DeclarePoints(N,B,P,_seqgen(_seqgen(_concat(hold(E),i,j),i,1..3),j,1..4)):
[Mathematica]DeclarePoints@@Flatten[Table[Symbol["E"<>ToString[i]<>ToString[j]],{i,3},{j,4}]];
DeclarePoints[N,B,P];
As is clear from the top three examples, all of which make the same changes to the variable GlobalPointDeclarations, the same functions can appear very different. While the difference between Maple and MuPAD is fairly straightforward with seq changing to _seqgen, cat changing to _concat, E being replaced by hold(E), and the = signs changing to commas, the Mathematica version involves completely different functions and the syntax is very different; it is difficult to make any sort of technique for changing this Maple MAMBO toolbox syntax into its Mathematica version.
There are many other differences in syntax between Maple, MuPAD, and Mathematica, of course, but those above are a few of them.

 


Documentation