MaplePrimes Questions

for i from 1 to numelems(X) do    
    A := x:
    B := C;
end;

 

maple will print all statements even though I use the colon to try to suppress the first line. This just seems wrong. If I suppress the entire loop I have to use prints, and if I have a lot of statements I have to do it for every one even if I just want to supress 1.

It seems maple is suppose to suppress but it isn't.

One problem I come across far to often is that if maple get's bogged down in a computation or I screwed something up I can't always stop it. Sometimes the red ! is greyed out and I have to kill the mserver. When I do this I get the error that I need to save but save doenst' work and I can't do anything because the the kernel was killed. Maple doesn't seem to be able to properly recover... even though it does it most of the time when I click on the red !.

 

Is there any way around this?

 

I get tired of having to resize my plots constantly so I can get a nicer view.

 

setPlotSize:=proc(P,sz::[posint,posint])
  op(0,P)(remove(type,[op(P)],'specfunc(ROOT)')[],
          ROOT(BOUNDS_X(0),BOUNDS_Y(0),
               BOUNDS_WIDTH(sz[1]),BOUNDS_HEIGHT(sz[2])));
end proc:

 

This let's one set the size(mine is usually 1200x500) but I have to stick it in every plot.

 

Is there a way to override the plot functions to automatically do this for every plot or create a simple short option to scale it to the window size or some specific size?

 

I could probably make a simple function like RPF()

 

that I can wrap every plot but I'd like to avoid that step and just apply it to all plots by default(since 99% of the time I have to scale them.

 

 

 

Something really weird is going on when I build a MultiSet in two different ways, using the "+" operation.  The two constructions give the same MultiSet (since U=V), but in some mysterious way they are not really equal (since X=Y is false).  Does anyone know how to avoid this?  Should the "+" operator be avoided altogether?

There is more:  I tried saving the values of X and Y using the command:  save X, Y, "anomaly.m" 

When I tried reading it with the command:  read "anomaly.m"
I got the error message:  "Error, could not open `anomaly.m` for reading".

Thanks!
 

restart

 

U := MultiSet(3 = 1)+MultiSet(4 = 1)

module MultiSet () local instance, hash, generalized; option object; end module

(1)

V := MultiSet(3 = 1)+MultiSet(4 = 1)

module MultiSet () local instance, hash, generalized; option object; end module

(2)

evalb(U = V)

true

(3)

X := [2, 7, U]; Y := [2, 7, V]

[2, 7, module MultiSet () local instance, hash, generalized; option object; end module]

 

[2, 7, module MultiSet () local instance, hash, generalized; option object; end module]

(4)

evalb(X = Y)

false

(5)

seq(evalb(X[i] = Y[i]), i = 1 .. 3)

true, true, true

(6)

``


 

Download Anomaly.mw

Hi everyone:

How can I re-write the EQ with transformation       s=1+2*((tau-t)/T0)    ?

EQ:=int(f1(t-tau)*(Sum(y[k]*F[k](tau), k = 0 .. M)), tau = t-T0 .. t)

tnx...

Hi,

How can I force the command InsertContent(Worksheet(Group(Input( T )))) to display the variable eq as it appears in label (2) ?

(a screen capture of the output of InsertContent(Worksheet(Group(Input( T )))) is given after the Maple code)

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

with(DocumentTools):

with(DocumentTools[Layout]):

eq := piecewise(t < 1, sin(t), cos(t));

C := Cell( Textfield(style=TwoDimOutput,Equation(eq)) ):
T := Table(Column(), widthmode=percentage, width=40, Row(C)):
InsertContent(Worksheet(Group(Input( T )))):

eq := piecewise(t < 1, sin(t), cos(t))

(2)

 



Download Layout.mw

Hi!

There is a (relatively) known software code (written in C), called ." GKLS-generator" or "GKLS" to generate, according to certain user paramenters, optimization test functions. The code is available for free at the web

http://wwwinfo.deis.unical.it/%7Eyaro/GKLS.html

The download with the files of the GKLS is the following:  download

I would like to write this code in Maple. In the attached zip there is a PDF explaining how to build these functions. For now, I tried the follwoing Maple code GKLS_v4.mw

I think I'm doing something wrong, since the drawing generated by the attached Maple does not look much like the PDF in the attached zip (Fig. 1 of page 8).

Please, Can you help me with this?

Many thanks in advance for your comments.

 

 

Hello

I have problem with Maple that is not simplifying equation completly:

My simplified equation:

1/u * (z - F__n1*sin(alpha__n1)*a*b*c*d + F__n2*sin(alpha__n2)*a*b*c*d + F__n3*sin(alpha__n3)*a*b*c*d)

 

It`s sum of F__n1*sin(alpha__n1)*a*b*c*d for example 20 elements and only n is increasing so why maple will not move a,b,c,d ahead parenthesis ?

 

Hi User!

Hope you would be fine with everything. I have a vector "POL" of M dimension obatined for the following expression

restart; with(LinearAlgebra); nu := 1; M := 3;
for k while k <= M do
Poly[k] := simplify(sum(x^i*GAMMA(nu+1)/(factorial(i)*GAMMA(2*nu)), i = 0 .. k-1))
end do;
POL := `<,>`(seq(Poly[k], k = 1 .. M))

and I want to construct a matrix of M by M by collocating it on the points x=i/(M-1) for i=0,1,2,...,M-1 like the following way,

For M=3 I need

Matrix(3, 3, {(1, 1) = Poly[1](0), (1, 2) = Poly[1](1/2), (1, 3) = Poly[1](1), (2, 1) = Poly[2](0), (2, 2) = Poly[2](1/2), (2, 3) = Poly[2](1), (3, 1) = Poly[3](0), (3, 2) = Poly[3](1/2), (3, 3) = Poly[3](1)});

For M=4 I need

Matrix(4, 4, {(1, 1) = Poly[1](0), (1, 2) = Poly[1](1/3), (1, 3) = Poly[1](2/3), (1, 4) = Poly[1](1), (2, 1) = Poly[2](0), (2, 2) = Poly[2](1/3), (2, 3) = Poly[2](2/3), (2, 4) = Poly[2](1), (3, 1) = Poly[3](0), (3, 2) = Poly[3](1/3), (3, 3) = Poly[3](2/3), (3, 4) = Poly[3](1), (4, 1) = Poly[4](0), (4, 2) = Poly[4](1/3), (4, 3) = Poly[4](2/3), (4, 4) = Poly[4](1)})

 

and general form is like this

[[[Poly[1](0/(M-1)),Poly[1](1/(M-1)),Poly[1]((2)/(M-2)),...,Poly[1]((M-1)/(M-1))],[Poly[2](0/(M-1)),Poly[2]((1)/(M-1)),Poly[2]((2)/(M-1)),...,Poly[2]((M-1)/(M-1))],[Poly[3]((0)/(M-1)),Poly[3]((1)/(M-1)),Poly[3]((2)/(M-1)),...,Poly[3]((M-1)/(M-1))],[...,...,...,...,...],[Poly[M]((0)/(M-1)),Poly[M]((1)/(M-1)),Poly[M]((2)/(M-1)),...,Poly[M]((M-1)/(M-1))]]];

Another problem is I want to define a vector of M dimension using a function f(x)=sin(x) and two points a=1, b=2 like the following way,

Vec:=[[[a],[f((1)/(M-1))],[f((2)/(M-1))],[f((3)/(M-1))],[...],[f((M-1)/(M-1))],[b]]]
Please fix my problem. I'm waiting for your kind response.
Special request @acer @acer @Carl Love @Kitonum @Preben Alsholm

Dear Users!

Hope you would be fine with everything. I want the simpliest for of the following expression in two step:

diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z))+u[delta]*lambda[1]*(diff(U(X, Y, Z, tau), tau, tau))/L[delta]+u[delta]*lambda[1]*(diff(U(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), X))/L[delta]+u[delta]*lambda[1]*U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, X))/L[delta]+u[delta]*lambda[1]*(diff(V(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), Y))/L[delta]+u[delta]*lambda[1]*V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, Y))/L[delta]+u[delta]*lambda[1]*(diff(W(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), Z))/L[delta]+u[delta]*lambda[1]*W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, Z))/L[delta];
Step 1:
diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z))+u[delta]*lambda[1]*(diff(diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z)), tau))/L[delta];
Step 2: (final form I need)
(1+(u[delta] lambda[1])/(L[delta]) (&PartialD;)/(&PartialD;tau)) ((&PartialD;)/(&PartialD;tau) U(X,Y,Z,tau)+U(X,Y,Z,tau) ((&PartialD;)/(&PartialD;X) U(X,Y,Z,tau))+V(X,Y,Z,tau) ((&PartialD;)/(&PartialD;Y) U(X,Y,Z,tau))+W(X,Y,Z,tau) ((&PartialD;)/(&PartialD;Z) U(X,Y,Z,tau)));
I'm waiting for your response.
Special request:
@acer @Carl Love @Kitonum @Preben Alsholm

I'm fairly new to using Maple and am having a bit of a hard time calculating the following inner product. Firstly, I define the tensors (which to this end I'm not certain they are correctly defined), 

with(Physics):

Setup(mathematicalnotation=true)

Setup(coordinatesystems=spherical):

ds2 := - dt^2 + a(t)^2 /( 1-k*r^2)*dr^2 + a(t)^2*r^2*dtheta^2 + a(t)^2*r^2*sin(theta)^2*dphi^2;
Setup(coordinates = spherical, metric = ds2);

e[mu, `~nu`] = Matrix(4, {(1,1)= a(t)/sqrt(1-k*r^2), (2,2)=a(t)*r, (3,3)=a(t)*r*sin(theta), (4,4)=1}, fill=0); (15) 
Define((15))
f[`~mu`, nu] = Matrix(4, {(1,1)=sqrt(1-k*r^2)/(a(t)), (2,2)= 1/(a(t)*r), (3,3)=1/(a(t)*r*sin(theta)), (4,4)=1}, fill=0); (28)
Define((28))

Thus, I defined two mixed tensors e[mu, `~nu`] (one covariant and one contravariant index ) and f[`~mu`, nu] (one contravariant and one covariant index).

Then, I try to take the following inner product between the two mixed tensors and the Christoffel symbols of the second kind, namely,

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel [`~nu`, sigma, mu];

where I used the Physics['.'] command . However, when I try taking this inner product, it returns unevaluated.

 

Did I define the mixed tensors incorrectly? Does it matter how you define the indices when you're gonna take the inner product? Because taking the inner product of simply e[mu, `~nu`].f[`~mu`, nu] also returns unevaluated. Also, I should mention that  e[mu, `~nu`] and f[`~mu`, nu] are inverses of each other, is there any way to define one and get the other, since, simply changing the way in which the indices are raised and lowered doesn't take the reciprocal of the components. 

Do you agree this solution given by Maple is not correct?

restart;
pde := diff(u(x,t),t)+diff(u(x,t),x)=0;
bc  := D[1](u)(0,t)=0;
ic  := u(x,0)=exp(-x^2);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming x>0,t>0;
pdetest(sol,pde)

Result of pdetest should be zero.

I think the PDE itself is not well posed (I copied it from different forum to see what Maple does with it). But still the solution clearly does not satisfy the PDE itself for x not zero. 

Maple 2019.2.1 with Physics version 573

Hi, 

It seems to me that variables (maybe I should have use 'names' instead) become "typed" only once they have been instanciated with ':=' ?

But is it possible in Maple  to do something like that
"I declare that variable V will be of type T even if I do not explicitely instanciate it?"

... or is it here one of the distinction between a "typed CAS" and a "non typed" CAS ?

Thanks in advance

test.mw

Please see the attached.

NLPSolve('f(x,y,'g(x,y)')', x=0..1,y=0..1) is not working...

with(ExcelTools):

 

Export(R,"π™΄πš–πš™πš•πš˜πš’πšŽπšŽπšœ.πš‘πš•πšœ","π™ΏπšŠπš’πš›πš˜πš•πš•","π™±πŸΈ")

 

----------------

how to make the export excel file take his name from variable ?

for example 

V:=800;

so the export file will make name as 800 , and so on |?

First 10 11 12 13 14 15 16 Last Page 12 of 1839
ο»Ώ