MaplePrimes Questions

Any one able to tell me why this won't work? 

 

cc:=proc(M,shift)
local x,string;
string:=expl(M);
for x in string do
cl(x,shift);
end do; end proc; 

expl:=proc(S)
Explode(S);
end proc;

cc(ok,1) returns 'l'

expl works, how come the procedure using expl doesn't explode the message and do the procedure on each letter?

Dear all

When may program begin the following massage appears 

kerenl connectio has been lost

When generating the list of all the permutations of  [$1..10]  we get an error:

combinat[permute]([$ 1 .. 10]);

    Error, (in combinat:-permute) Maple was unable to allocate enough memory to complete this computation. Please see ?alloc

 

But if the same problem to solve using a simple custom procedure, there is no any problems:

restart;

Permute := proc (L::list)

local n;

n := nops(L);

if nops(L) = 1 then return [L[1 .. 1]] else

[seq(seq([op(p[1 .. k-1]), L[1], p[k .. n-1][]], k = 1 .. n), p = Permute(L[2 .. n]))] end if;

end proc:

L := CodeTools[Usage](Permute([$ 1 .. 10])):

nops(L);

        

 

 

I'm trying to implement the QR algorithm to find the Eigenvalues of the input matrix which will be forwarded to another implementation (of the SVD alg.) to find the singular values. My implementation goes as follows:

1. feeding input: A::Matrix(datatype=float) # a bidiagonal matrix
2. construct input matrix for the QR alg. of matrix A and Z (zeros of size A): C := Matrix([[Z,Transpose(A)],[A,Z]], datatype=float); # therefore C should be symmetric
3. find the eigenvalues of matrix C with an implementation of the QR alg.:

for k from 1 to 400 do
Q, R := QRDecomposition(C);
C:=R.Q;
end do:

At this point, the eigenvalues of C should be placed in the diagonal of the matrix, but they're randomly placed around the diagonal, with only ~0 elements (like 2,xxx * 10^(-13)) in the diagonal.

If anyone knows how to resolve this, let the knowledge flow through. Any help will be appriciated, thanks in advance.

Hi, I'm having trouble trying to make a loop stop when a variable hits certain value. No, break doesn't help much as the code is intended to be executed w/ "execute the entire worksheet" command, and break only stops the calculation on this especific execution block (I'm using maple 18 btw).

Any ideas would be highly apreciated.

Hi

Dear friends

I use the command "dsolve(`union`(deq, initial), numeric, method = lsode)" for solving a fourth order ODE.

But for some numerical values of the parameters the bellow error is occurred:

" an excessive amount of work (greater than mxstep) was done ".

I have three questions:

1- how can I increase the mxstep from default amount (i.e. 500) to a greater value?

2- how can I ensure that the absolute error is less than 10E-6?

3- when I use lsode which way of numerical solution is applied (Euler,midpoint, rk3, rk4, rkf, heun, ... )?

 

Thanks a lot for your help

 

L(1):=[1,2,3]:

L(2):=[A,B,C]:

sum(nops(L(i)),i=1..2):

 

The real result of the sum is : 6.

Maple's result is : 2.

Yes, Maple gives an error.
But it doesn't matter, Maple is the most extraordinary software of the world !!!

Hi 

My teacher (im studing Technology Management and Marine engineering) only allow that we use maple if we display the results between calculations. Is that posible:

 

a := 4;

b := 5;

Instead of :

a+b=9

I want it displayed as:

a+b= 4+5= 9;

or just

4+5 = 9; where a and b are Automatically replaced with the respective values, when i run the !!! button

 

A lot of my calculations are done by defining the variables in the top. 

Any ideas??

 

Thanks in advance.

 

Best regards  Carsten Moller

 

 

 

Please check why Maple is not returning location of Minima in following case:

 

-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x)

-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x)

(1)

plot(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = -3.2 .. 3.2)

 

readlib(extrema):

{-0.6447467154e-1, 0.6447467152e-1}

(2)

Minima := op(1, {-0.6447467154e-1, 0.6447467152e-1}); 1; Maxima := op(2, {-0.6447467154e-1, 0.6447467152e-1})

-0.6447467154e-1

 

0.6447467152e-1

(3)

minimize(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = 0 .. 3.5, location)

minimize(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = 0 .. 3.5, location), {}

(4)

Why Maple is not returning location of minima?

 

Download Location_for_Max_Min.mw

Regards

y := 0.11083e-1+0.66489e-1*cos(n*x)+0.22089e-1*cos(2*n*x)+0.8903e-2*cos(3*n*x)-0.293e-3*cos(4*n*x)?

I used SOLVE to solve an inequality. The result shows things like this: 

How can I read the upper bound to a variable? 

THanks!

I can not find a cumulative sum procedure in maple2016.

I want to compute the cumulative sum of a list or vector.

A:=[1, 2, 3, 4];

cumsum(A); ## or whatever the maple function is... 

[1,3,6,10]

Tom Dean

Is there currently any way to perform Feynman integration after applying the Feynman rules for various electrodynamics processes? 

Can maple 2016 do renormalization of integrals? If we cannot currently do any of these, when will this features be available? Thank You very much.

Hi guys,

I'm doing some heavy analytical calculations, as the calculations take hours to finish, I want to save the results, which is easily done, however when I load the saved results, it behaves differently, somehow I can no longer substitute the variables. I extracted the main problem into the following minimal working example.

Thanks for any useful insight,

Cheers, Sören

restart():

assume(`in`(n, real))

x := n+1

n+1

(1)

subs(n = 1, x)

2

(2)

save x, "./myfunction.m";

read "./myfunction.m";

x

n+1

(3)

Now we can't substitute n in x:

subs(n = 1, x)

n+1

(4)

subs(n = 1, n+1)

2

(5)

y := x:

Download assume_and_save.mw

Hello,

I would like to export some plots from a worksheet as vectorial picture.

However, I didn't find how to export plots as .svg ou .emf files. These files are accepted by visio which is the software I use for the creation of my figures.

Is it possible to export picture as a vectorial picture and yes, how ?

Moreover, I would like these kind of extensions that is to say .svg and .emf

Thanks a lot for your help.

First 1131 1132 1133 1134 1135 1136 1137 Last Page 1133 of 2434