Alec Mihailovs

Dr. Aleksandrs Mihailovs

4470 Reputation

21 Badges

19 years, 294 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are answers submitted by Alec Mihailovs

parse(sprintf("%.2f",12.3678918));

                                12.37
First, factor is a Maple command, so it shouldn't be used as a variable. It may be changed to something like factor1. After that, the following will give the maximum,
> Optimization:-NLPSolve(p,0..2,0..1,maximize);

                                  [         2.         ]
            [12.3596191406250000, [                    ]]
                                  [0.500000000000000000]
Sprintf has good formatting options. In this case, the following would work almost right,
sprintf("%3d*(max(energy)-min(energy))",20*i)
To make it exactly right, the font should be changed to COURIER, i.e. after (or before) align=RIGHT, the font specification, something like font=[COURIER,12], should be added.
Most people that I know, use Classic Maple. So I don't believe that the classical Maple input will be abandoned. Also, I don't think that a normal work is possible with 2D math input, so one couldn't switch to it even if he wanted to. 2D math is better for demonstrations though (as circus tricks), so it is some sense in getting acquainted with it.
What version do you have? 10.01 can be downloaded here.
To modify an optimization flag, do
kernelopts(opaquemodules=false):
Compiler:-Build:-GetBuildVariable("CCOPT");
Copy the string, do necessary changes and enter it as the second argument in
Compiler:-Build:-SetBuildVariable("CCOPT",    );
The list of flag groups modifiable in the same way, can be obtained through
Compiler:-Build:-GetBuildVariable("COMPILE_COMMAND");
Compiler:-Build:-GetBuildVariable("LINK_COMMAND");
In Maple, it is not that simple, but can be done. For example, something like that, with replacing s_tyle with style,
with(plots):
a:=densityplot((x,y)->x*exp(-x^2-y^2),-2..2,-2..2,
     axes=frame,s_tyle=PATCHNOGRID,colorstyle=HUE,numpoints=6400):
b:=densityplot((x,y)->0.2*y,3..3.5,-2..2,
     s_tyle=PATCHNOGRID,colorstyle=HUE,axes=none,numpoints=5000):
c:=textplot([seq([3.8,-1.95+i/8*3.9,sprintf("%.1f",-0.4+i/10)],i=0..8)]):
display(a,b,c,scaling=constrained);
In masm, exit from a procedure with 'ret' cleans the (invisible in the procedure part of the) stack (such as local variables, for example), pushs and pops still have to be balanced in the procedure. Some people don't like that, because it adds a few clocks, and use 'retn' instead - but then they should take care of cleaning stack themselves. It can be done as a part of optimization process, if desirable.
Such an error usually occurs if one tries to edit the expression - for example, delete something, or insert. The underlying MathML structure can be easily broken. It is better to avoid such actions in 2D mode. If you want to be able to edit expressions, it is better to use an old-fashioned one-dimensional Maple input.
How about that,
s:=unapply(solve({tan(X/2) = Vt/Hr,tan(X) = (V-Vt)/Hl},{X,Vt}),Hl,Hr,V):
sol:=(Hl,Hr,V)->evalf(map(x->subsindets(s(Hl,Hr,V),RootOf,x),
     [fsolve(op(indets(s(Hl,Hr,V),RootOf)[1]),_Z=0..infinity)])):

sol(10,42,50);
[{Vt = 69.21133676, X = 2.050729560}, {Vt = -46.57358105, X = -1.673976590}, {X = 1.154832695, Vt = 27.36224423}]
In the first example, you missed a multiplication sign in 2(1+3*i/n). It should be 2*(1+3*i/n). Without the multiplication sign, Maple assumes that 2 is a function, so 2(...)=2. That explains the answer. In the second example, you obviously missed i, it should be -2-6*i/n. Without i, the given answer is incorrect.
FunctionChart(x^2,x=-2..2) works OK, If, for some reason, you want extend the y-axis, the view also can be used, FunctionChart(x^2, x = -2 .. 2, view = [-2 .. 2, 0 .. 9]) The problem with your input is that if the x-range is not entered, it automatically becomes [-10..10].
As it is said in the gcc tutorial,
  • Actual parameters are parameters as they appear in function calls.
  • Formal parameters are parameters as they appear in function declarations.
In Windows, in text mode, PartialD can be typed by switching to MaplePi font in the list of fonts, holding Alt button and typing 0182 in the numerical keyboard (at the right hand side, not at the top).
In Classic worksheet, \xF0 produces a symbol close to a PartialD. For example,
 > \xF0x/\xF0y;

                                  ðx
                                 ----
                                  ðy
First 73 74 75 76 Page 75 of 76