acer

32373 Reputation

29 Badges

19 years, 333 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

There is no such options as size for 3D plotting commands, and hence it is not accepted by the plots:-setoptions3d command.

However, the ROOT substructure which is used for 2D plots can in fact be inserted into a PLOT3D structure, and the GUI will repsect it.

Below is a command which will insert such a ROOT substructure into a PLOT3D structure, and resize it.

Since the Library commands don't expect to encounter such a substructure within a PLOT3D structure, you may need to ensure that this is the last operation done prior to displaying the plot. Eg, you may wish to apply it only after combining multiple plots using plots:-display, or applying plottools:-transform and friends to the original 3D plot.

You can always remove such a substructure with subsindets, since that substructure is a ROOT function call.

Note that the ROOT substructure modifies the plotting window's size, but does not rescale or zoom the plot. The routine I've provided allows width and height to be different, but in practice you'll find that only square dimensions (ie, m=n) produces something useful.

This functionality to specify the size of 3D plots has been on my wishlist for quite a while now. But I feel that a true solution would also consist of functionality to set the scaling factor (zoom) as well as custom aspect ratios for constrained 3D plots (which would need entirely new items allowed in the PLOT3D sustructure). For 2D plots all that is naturally obtained by just the dimensions, but for 3D plots all those features are related but distinct.

restart;

SetSize3D:=proc(P3D::specfunc(anything,{PLOT3D}),
                m::And(positive,numeric),
                n::And(positive,numeric))
  local R, P, P3Dnew;
  P := plot([[0,0]], ':-size'=[m,n]);
  R := indets(P, 'specfunc(anything,:-ROOT)')[1];
  P3Dnew := subsindets(P3D, 'specfunc(anything,:-ROOT)', ()->NULL);
  op(0,P3Dnew)(op(P3Dnew), R);
end proc:

Q := plot3d(sin(x)*y^2, x=-Pi .. Pi, y=-1 .. 1):
Q;

Qnew := SetSize3D(Q, 200,200);

SetSize3D(Qnew, 700, 700);

SetSize3D(Qnew, 300, 450);

SetSize3D(Qnew, 700, 300); # left-click on it to see that the box is wider

 

Download SetSize3D.mw

Sometimes it is convenient to pass multiple arguments via one or more Arrays (or Vectors), if you are going to be calling it several times, with manual typing.

This can make calling the procedure shorter to type, and less work if only a few entries get changed between calls. Eg,

Params[45] := newvalue:
Params[46] := anothervalue:
Func( Params );

Of course it's becomes necessary to document adequately the role of each Array entry. Stay organized, as that will pay off.

And you can use a few such Array parameters, separating them in various ways: by type (integers vs floats vs others), or by purpose. You can also have some additional parameters still be passed as scalar, or via positional or keyword options.

This approach can become awkward if you want to program a sequence of calls to the procedure, and one of the Array entries is varying.

You mentioned that your worksheet has 100 or more parameters. I would not be surprised if there would be benefits to doing the computations using several procedures, and those might not all require all the parameters to be passed. A reasonable amount of focus on an effective design of the computational flow usually pays off.

The background option for 2D plots was introduced in Maple 18.

So if really do have Maple 16 (and not Maple 2016, which later) then one way to get a curve plotted over an image involves first turning the image into a densityplot.

You didn't say whether you wanted to re-scale the sine curve, vertically, if the image was not in the same proportions as the x- and y-ranges. Or vice versa. So I chose the former. And it wasn't clear whether you wanted to display axes, whose tickmarks might match the sine values and x-y data.

restart:

kernelopts(version);

`Maple 16.01, X86 64 LINUX, May 6 2012, Build ID 744592`

(1)

fn:=cat(kernelopts(mapledir),"/data/tree.jpg"):

P:=ImageTools:-Read(fn):
P:=ImageTools:-Scale(P, 0.5):

m,n := ImageTools:-Width(P),ImageTools:-Height(P);

C:=ArrayTools:-Alias(P,[m*n,3]):

ArrayTools:-DataTranspose(C,n,m,1):

img:=ArrayTools:-Alias(C,[m,n,3]):

img:=ArrayTools:-FlipDimension(img,2):

# Create a dummy density plot, whose data we'll replace with that from the image.

Pimage:=plots:-densityplot(1,x=1..m,y=1..n,axes=none,scaling=constrained,
                           restricttoranges=true,

                           style=patchnogrid,gridlines=false,grid=[m,n]):

Pimage:=subsindets(Pimage,specfunc(anything,COLOR),z->COLOR(RGB,img)):

200, 133

(2)

a,b := 0, 2*Pi;
Psin := plot(sin(x), x=a..b):

0, 2*Pi

(3)

hi,lo := [max,min](op([1,1],Psin)[..,2])[]: # or just use -1 and 1

 

Newsin:=plottools:-transform((x,y)->[(x-a)*(m-1)/(b-a)+1,(y-lo)*(n-1)/(hi-lo)+1])(Psin):

plots:-display( Pimage, Newsin );

 

 

Download background_maple16.mw

Look inside the Startup Code Region of this first attachment.  From the main menubar choose items Edit -> Startup Code (Ctrl-Shift-E).

MaplePlayerSlideShowTest_ac.mw

Alternatively, you could make the calls to DocumentTools:-SetProperty be full and explicit, in the action code of the Buttons. And you could also form their action strings with Plot1 explicitly replacing id. In this next attachment there is no need for Startup Code.

MaplePlayerSlideShowTest_ac_2.mw

You forgot to give numeric values for A and `ϑ` .

Are you trying to get y-values for the curves at a common set of sigma values?

That is possible for the upper four curves, since they start (or finish) at the same value of sigma.

It's not clear what meaning it would have to conjoin the lower curves, since they start at different values of sigma. Please explain what you hope to represent by the 1001x4 Matrix, for those lower curves.

fig10_ac.mw

f := (x, y) -> sin(x)*cos(y):

plot3d(f, -Pi .. Pi, -2*Pi .. 2*Pi,
       style = surfacecontour,
       labels = ["x","y","f"]);

Or, with your own custom choice of contour values (heights),

plot3d(f, -Pi .. Pi, -2*Pi .. 2*Pi,
       style = surfacecontour,
       contours = [-0.5, 0.0, 0.5]);

I consider setting UseHardwareFloats to true as a top-level initialization to be highly dubious.

The default setting is deduced, which means that if Digits<=15 then most Library procedures which take into account such things will already treat deduced like true. You're not getting a whole whack more computations being done with hardware floats with true than you would with deduced, provided that Digits<=15.

Setting it to true will prevent some procedures from working with higher precision software floats, even when they decide either that they should or that they need to for correctness.

If you want scalar floats to be HFloats for some computations, or to always be HFloats when pulled out of datatype=float[8] rtables, then restrict the forced UseHardwareFloats setting to within a procedure (as Joe mentioned, environment variables don't affect the higher scope, by design). Or put option hfloat on such procedures.

If the only big effect of setting UseHardwareFloats:=true was to speed up calculations by doing it all in hardware double precision then it would be Maplesoft's default. But it's not. That setting hobbles the system, understandably IMO.

 

restart;

dsys := {diff(y(t),t)=-y(t-1),y(0)=2}:

dsn := dsolve(dsys, numeric, output=listprocedure):

yfun := eval(y(t), dsn):

yfun(0.0);

HFloat(2.0)

yfun(1.4);

HFloat(-0.6399999629131263)

plot([D[1](yfun)(t), -yfun(t-1)], t=0 .. 6,
     style=[line,point], gridlines=false,
     symbolsize=15, symbol=solidcircle,
     adaptive=false, numpoints=21);

 

Download dde.mw

r := 1.9;
                            r := 1.9
i := trunc(r);
                             i := 1

First of all, you don't tell us anything about the qualitative nature of the plot you are expecting, or what specifically you object to above the plot originally produced. (The thing you wrote about "two arguments" makes no literal sense.)

We can of course guess that you object to the sign flip between the discontinuities. But tell us precisely.

Next, while it may not be the cause of your issues, it looks like a really bad idea to apply evalf all over the place, and have those float exponents. Do you understand that when there are branch-cut issues -- around say rational multiples of Pi -- turning exact values into floating-point representations can be trouble. If the float rounds just above..., or just below..., the behavior can change.

So, I am guessing that the combine(zeta_c, symbolic) might resolve your issue. (But, really, you're the one who supplied the various exp calls in the first place, without explanation or source...)

Here's one version with floats, and one without. Is this the plot you expected? Or perhaps as likely, its negation?

Toya_complexPlot2_ac.mw

Toya_complexPlot2_ac_exact.mw

I no longer believe in coincidences.

Working on another question here -- right now -- I stumbled across the same phenomenon.

The problem is the gridlines option, which your .mapleinit sets to true in a call to plots:-setoptions.

If I include that gridlines setting, then the GUI goes bonkers in the way described when I try to use plottools:-transform to raise a 2D plot up to 3D. (I have to use the menubar's Edit->Remove Output From Worksheet, then Save As another filename, then File->Close, then re-open, etc, to recover.

But if I exclude that setting then it goes OK.

I found this out, on the side, because I now habitually use plots:-setoptions to set gridlines=false so that the ancient Mapleprimes backend MapleNet engine doesn't render my inlined worksheet's 2D plots with ugly gridlines.

And then when I tried to transform a 2D plot to 3D I saw the same GUI crash, in Maple 2018.1 on 64bit Linux.

One might guess that setting gridlines=false wouldn't do anything concrete, since the default in the Maple GUI is not to show gridlines when no option for it is supplied. But in recent versions of Maple it actually puts a _GRIDLINES substructure within the PLOT structure of a 2D plot.

Anyway, the problem seems to happen whether the 2D plot is constructed with gridlines=true or gridlines=false.

Anyway, either the plottools:-transform command doesn't handle the GRIDLINES substructure properly when converting from PLOT to PLOT3D, or the GUI is mis-handling what it gets. Probably the former, where plottools is now failing to strip it out, since 3D plots don't really support gridlines. I will submit a bug report.

If you wish to retain your use of the gridlines option within the setoptions call, you could work around the issue by stripping out the _GRIDLINES structure.

restart;

plots[setoptions](axes=boxed,gridlines=true,symbol=solidcircle,symbolsize=20,\
font=[Palatino,Roman,18],labeldirections=[default,vertical]):

XX := [0.972801894435012e-2, 0.291840568330504e-1, 0.486400947217506e-1, 0.680961326104508e-1, 0.875521704991511e-1, .107008208387851, .126464246276552, .145920284165252, .165376322053952, .184832359942652, .204288397831353, .223744435720053, .243200473608753, .262656511497453, .282112549386153, .301568587274854, .321024625163554, .340480663052254, .359936700940954, .379392738829655, .398848776718355, .418304814607055, .437760852495755, .457216890384456, .476672928273156, .496128966161856, .515585004050556, .535041041939257, .554497079827957, .573953117716657, .593409155605357, .612865193494058, .632321231382758, .651777269271458, .671233307160158, .690689345048859, .710145382937559, .729601420826259, .749057458714959, .768513496603660, .787969534492360, .807425572381060, .826881610269760, .846337648158460, .865793686047161, .885249723935861, .904705761824561, .924161799713261, .943617837601962, .963073875490662]:

YY := [0., 0., 0.780705528028337e-4, -0.211866241843197e-3, -0.184081483518222e-3, -5.92871649289528*10^(-7), 0.705340540980509e-4, -0.461174040475175e-4, 6.08388233646549*10^(-6), -8.17545249012504*10^(-6), 0.784067792614267e-4, 0.948234032955701e-4, 0.129200206984893e-3, 0.217379985100455e-3, 0.117812477986346e-3, 0.740892827191450e-4, 0.713995793942092e-4, 0.883487018223552e-4, 0.114636346351373e-3, 0.126761621156635e-3, 0.249346062938405e-3, 0.353610442001781e-3, 0.389331161267054e-3, 0.285297377949754e-3, 0.206965990122876e-3, 0.198776365299836e-3, 0.274456081855498e-3, 0.150247195410351e-3, 0.373870077694107e-3, 0.389541749965941e-3, 0.195404380104158e-3, 0.496058769010207e-4, 0.143186561641884e-3, 0.495342494399980e-4, 0.284041858195664e-3, 0.218772341089506e-3, 0.871267097462542e-4, 0.140083271975313e-3, 0.278100169819868e-3, 0.492898546422542e-4, 0.528148364100161e-4, 0.336946605866647e-3, 0.144331022273297e-3, 0.213563703188388e-3, 0.533896184036048e-4, -0.297228533778489e-4, 0.551702396397926e-4, 0.192723516977434e-3, -0.351998902998264e-4, -0.979722172527731e-2]:

plt:=plot(XX,YY,view=[default,0..0.003]);

tr:=plottools:-transform((x,y) -> [x,2,y]):

temp := subsindets(plt, 'specfunc(anything,_GRIDLINES)', ()->NULL):
plots:-display(tr(temp));

 

Download display3d_subs.mw

Try the command ListDirectory from the FileTools package.

Your main problem was that you were calling your procedure UP with GAMMA as the argument instead of the typeset GAMMA-with-an-overbar.

In order to use Grid:-Seq here you also need to tell the kernel to pass along the definitions of `index/xxx` and RrProc. For that you can use the Grid:-Set command. And also, pass Rr into UP.

I changed the unprotect(GAMMA) to local GAMMA as a top-level declaration. You don't anything like that for the typeset GAMMA-with-an-overbar.

Now the Grid:-Seq runs twice as fast as seq on the two UP calls, on my quad-core 64bit Linux machine under Maple 2017.2. I change M=5 to M=12, to make it take a little longer.

What matters is the real time, which is wall-clock time.

[edited] If I set M=100 to make it long enough to examine the timings better, it takes 33sec with Grid:-Seq and 66sec with serial seq. And the answers are the same. Under serial seq my Linux machine's load showed at 100% (one mserver process), while under Grid:-seq it showed at 200% (across two mserver processes). 

[edited] Your mileage here may vary with OS and Maple version, but this exercise leaves my OS running multiple defunct or orphaned mserver processes (taking no load, phew!), even when the GUI is completely quit. I have to kill them manually.

``

restart

kernelopts(version)

`Maple 2017.2, X86 64 LINUX, Jul 19 2017, Build ID 1247392`

II := 2

2

JJ := 2

2

N := 2

_local(GAMMA)

q := max(II+1, JJ+1)

M := 12

seq(seq(seq(assign(GAMMA[i, j, r], a*`#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[i, j, r]), i = 0 .. q), j = 0 .. q), r = 1 .. N)

a := .2; b := 2; with(ArrayTools)

RrProc := proc (i, m) local K, j, Q; if i <= m then 0 else K := 1; Q := Matrix(i, 1); for j by 2 to i do Q(j) := 2*i-K; K := 4+K end do; Q := FlipDimension(Q, 1); Q(m+1) end if end proc; `index/xxx` := proc (L) RrProc(op(L)) end proc; Rr := table(xxx)
NULL

`#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))` := Array(0 .. II, 0 .. JJ, 1 .. 6, 1 .. M)

f1 := RandomArray(II+1, JJ+1); f2 := RandomArray(II+1, JJ+1); f3 := RandomArray(II+1, JJ+1); f4 := RandomArray(II+1, JJ+1); f5 := RandomArray(II+1, JJ+1); f6 := RandomArray(II+1, JJ+1)

for m to M do `&Gamma;m`[1, m] := f1; `&Gamma;m`[2, m] := f2; `&Gamma;m`[3, m] := f3; `&Gamma;m`[4, m] := f4; `&Gamma;m`[5, m] := f5; `&Gamma;m`[6, m] := f6 end do

for m to M do `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 1, m] := ArrayTools:-Alias(`&Gamma;m`[1, m], [0 .. II, 0 .. JJ]); `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 2, m] := ArrayTools:-Alias(`&Gamma;m`[2, m], [0 .. II, 0 .. JJ]); `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 3, m] := ArrayTools:-Alias(`&Gamma;m`[3, m], [0 .. II, 0 .. JJ]); `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 4, m] := ArrayTools:-Alias(`&Gamma;m`[4, m], [0 .. II, 0 .. JJ]); `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 5, m] := ArrayTools:-Alias(`&Gamma;m`[5, m], [0 .. II, 0 .. JJ]); `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`[0 .. II, 0 .. JJ, 6, m] := ArrayTools:-Alias(`&Gamma;m`[6, m], [0 .. II, 0 .. JJ]) end do

UP := proc (s, GAMMA, N, M, a, b, II, JJ, Rr) local k; i, j, r, p, m, q, n, l; if s = 1 then add(add(add(add(add(add((2/3)*Rr[i, m]*Rr[k, m]*b*add(GAMMA[i, j, q, p]*GAMMA[k, j, q, r]*tau[p](t)*tau[r](t), q = 1 .. N)/((2*m+1)*(2*j+1)*a), i = 0 .. II), k = 0 .. II), m = 0 .. II), j = 0 .. JJ), p = 1 .. M), r = 1 .. M) elif s = 2 then add(add(add(add(add(add((1/2)*Rr[i, m]*Rr[k, m]*b*add(GAMMA[i, j, q, p]*GAMMA[k, j, q, r]*tau[p](t)*tau[r](t), q = 1 .. N)/((2*m+1)*(2*j+1)*a), i = 0 .. II), k = 0 .. II), m = 0 .. II), j = 0 .. JJ), p = 1 .. M), r = 1 .. M) end if end proc

Grid:-Set(`index/xxx`);
Grid:-Set(RrProc);

forget(evalf); ans1 := CodeTools:-Usage([Grid:-Seq(UP(s, `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`, N, M, a, b, II, JJ, Rr), s = 1 .. 2)])

memory used=186.05KiB, alloc change=2.19MiB, cpu time=15.00ms, real time=509.00ms, gc time=0ns

[HFloat(25.72145649709499)*tau[11](t)^2+HFloat(25.72145649709499)*tau[10](t)^2+HFloat(25.72145649709499)*tau[9](t)^2+HFloat(25.72145649709499)*tau[5](t)^2+HFloat(25.72145649709499)*tau[12](t)^2+HFloat(25.72145649709499)*tau[4](t)^2+HFloat(25.72145649709499)*tau[3](t)^2+HFloat(25.72145649709499)*tau[7](t)^2+HFloat(25.72145649709499)*tau[8](t)^2+HFloat(25.72145649709499)*tau[6](t)^2+HFloat(25.72145649709499)*tau[2](t)^2+HFloat(25.72145649709499)*tau[1](t)^2+HFloat(51.44291299418998)*tau[12](t)*tau[11](t)+HFloat(51.44291299418998)*tau[12](t)*tau[10](t)+HFloat(51.44291299418998)*tau[11](t)*tau[10](t)+HFloat(51.44291299418998)*tau[12](t)*tau[5](t)+HFloat(51.44291299418998)*tau[11](t)*tau[5](t)+HFloat(51.44291299418998)*tau[7](t)*tau[6](t)+HFloat(51.44291299418998)*tau[10](t)*tau[5](t)+HFloat(51.44291299418998)*tau[9](t)*tau[5](t)+HFloat(51.44291299418998)*tau[10](t)*tau[9](t)+HFloat(51.44291299418998)*tau[8](t)*tau[5](t)+HFloat(51.44291299418998)*tau[7](t)*tau[5](t)+HFloat(51.44291299418998)*tau[6](t)*tau[5](t)+HFloat(51.44291299418998)*tau[12](t)*tau[4](t)+HFloat(51.44291299418998)*tau[11](t)*tau[4](t)+HFloat(51.44291299418998)*tau[10](t)*tau[4](t)+HFloat(51.44291299418998)*tau[9](t)*tau[4](t)+HFloat(51.44291299418998)*tau[8](t)*tau[4](t)+HFloat(51.44291299418998)*tau[7](t)*tau[4](t)+HFloat(51.44291299418998)*tau[6](t)*tau[4](t)+HFloat(51.44291299418998)*tau[5](t)*tau[4](t)+HFloat(51.44291299418998)*tau[12](t)*tau[7](t)+HFloat(51.44291299418998)*tau[12](t)*tau[3](t)+HFloat(51.44291299418998)*tau[11](t)*tau[7](t)+HFloat(51.44291299418998)*tau[11](t)*tau[3](t)+HFloat(51.44291299418998)*tau[12](t)*tau[6](t)+HFloat(51.44291299418998)*tau[10](t)*tau[3](t)+HFloat(51.44291299418998)*tau[9](t)*tau[3](t)+HFloat(51.44291299418998)*tau[8](t)*tau[3](t)+HFloat(51.44291299418998)*tau[7](t)*tau[3](t)+HFloat(51.44291299418998)*tau[6](t)*tau[3](t)+HFloat(51.44291299418998)*tau[5](t)*tau[3](t)+HFloat(51.44291299418998)*tau[10](t)*tau[7](t)+HFloat(51.44291299418998)*tau[4](t)*tau[3](t)+HFloat(51.44291299418998)*tau[12](t)*tau[8](t)+HFloat(51.44291299418998)*tau[11](t)*tau[6](t)+HFloat(51.44291299418998)*tau[11](t)*tau[8](t)+HFloat(51.44291299418998)*tau[12](t)*tau[2](t)+HFloat(51.44291299418998)*tau[9](t)*tau[7](t)+HFloat(51.44291299418998)*tau[11](t)*tau[2](t)+HFloat(51.44291299418998)*tau[10](t)*tau[8](t)+HFloat(51.44291299418998)*tau[10](t)*tau[2](t)+HFloat(51.44291299418998)*tau[9](t)*tau[2](t)+HFloat(51.44291299418998)*tau[10](t)*tau[6](t)+HFloat(51.44291299418998)*tau[8](t)*tau[7](t)+HFloat(51.44291299418998)*tau[8](t)*tau[2](t)+HFloat(51.44291299418998)*tau[7](t)*tau[2](t)+HFloat(51.44291299418998)*tau[9](t)*tau[8](t)+HFloat(51.44291299418998)*tau[6](t)*tau[2](t)+HFloat(51.44291299418998)*tau[5](t)*tau[2](t)+HFloat(51.44291299418998)*tau[4](t)*tau[2](t)+HFloat(51.44291299418998)*tau[3](t)*tau[2](t)+HFloat(51.44291299418998)*tau[9](t)*tau[6](t)+HFloat(51.44291299418998)*tau[12](t)*tau[1](t)+HFloat(51.44291299418998)*tau[12](t)*tau[9](t)+HFloat(51.44291299418998)*tau[11](t)*tau[1](t)+HFloat(51.44291299418998)*tau[10](t)*tau[1](t)+HFloat(51.44291299418998)*tau[8](t)*tau[6](t)+HFloat(51.44291299418998)*tau[9](t)*tau[1](t)+HFloat(51.44291299418998)*tau[8](t)*tau[1](t)+HFloat(51.44291299418998)*tau[7](t)*tau[1](t)+HFloat(51.44291299418998)*tau[11](t)*tau[9](t)+HFloat(51.44291299418998)*tau[6](t)*tau[1](t)+HFloat(51.44291299418998)*tau[5](t)*tau[1](t)+HFloat(51.44291299418998)*tau[2](t)*tau[1](t)+HFloat(51.44291299418998)*tau[3](t)*tau[1](t)+HFloat(51.44291299418998)*tau[4](t)*tau[1](t), HFloat(19.291092372821243)*tau[11](t)^2+HFloat(19.291092372821243)*tau[10](t)^2+HFloat(19.291092372821243)*tau[9](t)^2+HFloat(19.291092372821243)*tau[5](t)^2+HFloat(19.291092372821243)*tau[12](t)^2+HFloat(19.291092372821243)*tau[4](t)^2+HFloat(19.291092372821243)*tau[3](t)^2+HFloat(19.291092372821243)*tau[7](t)^2+HFloat(19.291092372821243)*tau[8](t)^2+HFloat(19.291092372821243)*tau[6](t)^2+HFloat(19.291092372821243)*tau[2](t)^2+HFloat(19.291092372821243)*tau[1](t)^2+HFloat(38.582184745642486)*tau[12](t)*tau[11](t)+HFloat(38.582184745642486)*tau[12](t)*tau[10](t)+HFloat(38.582184745642486)*tau[11](t)*tau[10](t)+HFloat(38.582184745642486)*tau[12](t)*tau[5](t)+HFloat(38.582184745642486)*tau[11](t)*tau[5](t)+HFloat(38.582184745642486)*tau[7](t)*tau[6](t)+HFloat(38.582184745642486)*tau[10](t)*tau[5](t)+HFloat(38.582184745642486)*tau[9](t)*tau[5](t)+HFloat(38.582184745642486)*tau[10](t)*tau[9](t)+HFloat(38.582184745642486)*tau[8](t)*tau[5](t)+HFloat(38.582184745642486)*tau[7](t)*tau[5](t)+HFloat(38.582184745642486)*tau[6](t)*tau[5](t)+HFloat(38.582184745642486)*tau[12](t)*tau[4](t)+HFloat(38.582184745642486)*tau[11](t)*tau[4](t)+HFloat(38.582184745642486)*tau[10](t)*tau[4](t)+HFloat(38.582184745642486)*tau[9](t)*tau[4](t)+HFloat(38.582184745642486)*tau[8](t)*tau[4](t)+HFloat(38.582184745642486)*tau[7](t)*tau[4](t)+HFloat(38.582184745642486)*tau[6](t)*tau[4](t)+HFloat(38.582184745642486)*tau[5](t)*tau[4](t)+HFloat(38.582184745642486)*tau[12](t)*tau[7](t)+HFloat(38.582184745642486)*tau[12](t)*tau[3](t)+HFloat(38.582184745642486)*tau[11](t)*tau[7](t)+HFloat(38.582184745642486)*tau[11](t)*tau[3](t)+HFloat(38.582184745642486)*tau[12](t)*tau[6](t)+HFloat(38.582184745642486)*tau[10](t)*tau[3](t)+HFloat(38.582184745642486)*tau[9](t)*tau[3](t)+HFloat(38.582184745642486)*tau[8](t)*tau[3](t)+HFloat(38.582184745642486)*tau[7](t)*tau[3](t)+HFloat(38.582184745642486)*tau[6](t)*tau[3](t)+HFloat(38.582184745642486)*tau[5](t)*tau[3](t)+HFloat(38.582184745642486)*tau[10](t)*tau[7](t)+HFloat(38.582184745642486)*tau[4](t)*tau[3](t)+HFloat(38.582184745642486)*tau[12](t)*tau[8](t)+HFloat(38.582184745642486)*tau[11](t)*tau[6](t)+HFloat(38.582184745642486)*tau[11](t)*tau[8](t)+HFloat(38.582184745642486)*tau[12](t)*tau[2](t)+HFloat(38.582184745642486)*tau[9](t)*tau[7](t)+HFloat(38.582184745642486)*tau[11](t)*tau[2](t)+HFloat(38.582184745642486)*tau[10](t)*tau[8](t)+HFloat(38.582184745642486)*tau[10](t)*tau[2](t)+HFloat(38.582184745642486)*tau[9](t)*tau[2](t)+HFloat(38.582184745642486)*tau[10](t)*tau[6](t)+HFloat(38.582184745642486)*tau[8](t)*tau[7](t)+HFloat(38.582184745642486)*tau[8](t)*tau[2](t)+HFloat(38.582184745642486)*tau[7](t)*tau[2](t)+HFloat(38.582184745642486)*tau[9](t)*tau[8](t)+HFloat(38.582184745642486)*tau[6](t)*tau[2](t)+HFloat(38.582184745642486)*tau[5](t)*tau[2](t)+HFloat(38.582184745642486)*tau[4](t)*tau[2](t)+HFloat(38.582184745642486)*tau[3](t)*tau[2](t)+HFloat(38.582184745642486)*tau[9](t)*tau[6](t)+HFloat(38.582184745642486)*tau[12](t)*tau[1](t)+HFloat(38.582184745642486)*tau[12](t)*tau[9](t)+HFloat(38.582184745642486)*tau[11](t)*tau[1](t)+HFloat(38.582184745642486)*tau[10](t)*tau[1](t)+HFloat(38.582184745642486)*tau[8](t)*tau[6](t)+HFloat(38.582184745642486)*tau[9](t)*tau[1](t)+HFloat(38.582184745642486)*tau[8](t)*tau[1](t)+HFloat(38.582184745642486)*tau[7](t)*tau[1](t)+HFloat(38.582184745642486)*tau[11](t)*tau[9](t)+HFloat(38.582184745642486)*tau[6](t)*tau[1](t)+HFloat(38.582184745642486)*tau[5](t)*tau[1](t)+HFloat(38.582184745642486)*tau[2](t)*tau[1](t)+HFloat(38.582184745642486)*tau[3](t)*tau[1](t)+HFloat(38.582184745642486)*tau[4](t)*tau[1](t)]

forget(evalf); ans2 := CodeTools:-Usage([seq(UP(s, `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`, N, M, a, b, II, JJ, Rr), s = 1 .. 2)])

memory used=141.52MiB, alloc change=4.00MiB, cpu time=1.03s, real time=1.03s, gc time=125.44ms

ans1-ans2

[0, 0]

forget(evalf); ans1 := CodeTools:-Usage([Grid:-Seq(UP(s, `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`, N, M, a, b, II, JJ, Rr), s = 1 .. 2)])

memory used=116.91KiB, alloc change=4.38MiB, cpu time=42.00ms, real time=489.00ms, gc time=32.16ms

forget(evalf); ans2 := CodeTools:-Usage([seq(UP(s, `#mover(mi("&Gamma;",fontstyle = "normal"),mo("&uminus0;"))`, N, M, a, b, II, JJ, Rr), s = 1 .. 2)])

memory used=137.51MiB, alloc change=-2.00MiB, cpu time=1.04s, real time=970.00ms, gc time=145.08ms

ans1-ans2

[0, 0]

``

Download soal_ac.mw

The problem is that you are trying to use GAMMA as if it were a previously unused name. But it is already the name of a procedure in Maple itself.

Trying to unprotect the name, so as to try and use it like a regular, unassigned name, is something you should NOT do.

The error message is telling you what to do. Replace the call to unprotect(GAMMA) with,

local GAMMA;

Or use another name. That might be advisable, if it's supposed to be passed off via Grid

First 165 166 167 168 169 170 171 Last Page 167 of 336