MaplePrimes Questions

Hi all in my (very long) code I deal with many dozens of procedures that use a lot of global variables. I declare all of them in the classic way: a:=proc(b, ..., c) local ... global g1, g2, ..., gn; body end proc; I was wondering if there is a way to create a global variable containing the names (not the values) of the global variables g1...gn, so that I can use this variable to pass all the global to the procedures, instead of having to write all of them every time... Thanks S.

Is Maple able to recognize Excel sheets, or maybe other data structures to which I can export Excel tables and have them represented as Arrays or tables or anything else in Maple?

E.g. I have the following Array:

A:=Array(1..3,1..5,[[11,12,13,14,15],[21,22,23,24,25],[31,32,33,34,35]]);

Now I´d like to shuffle the rows of that Array randomly.

How may I do that most efficiently?
 

I think I know why they are the same but they shouldn't be. 

If I pointplot3d with symbol=sphere I get what I expect.  When I use symbol=circle I would expect a flat circle to be drawn.  Is this an option that was missed?  or is it that Maple just didn't carry the command over to 3d land?

 

Dear all

I have a problem with a non linar equation systems. Basically it takes long time  to show me the results

The systems is the following,

R1 := -(1-y)*sqrt(1-x^2)-x*sqrt(1-y^2)+(1/4)*y*(x*sqrt(1-z^2)-z*sqrt(1-x^2))*J = 0;
R2 := -y*(sqrt(1-z^2)+sqrt(1-x^2))+(z+x)*sqrt(1-y^2)-(1/4)*sqrt(1-y^2)*(x*z+sqrt((1-x^2)*(1-z^2)))*J = 0;
R3 := -(1-y)*sqrt(1-z^2)-z*sqrt(1-y^2)-(1/4)*y*(x*sqrt(1-y^2)-y*sqrt(1-x^2))*J = 0;

solve({R1,R2,R3}, {x,y,z}) assuming J>0

Could one help me?

Thanks in advance

Daniel

Hi all I'd like to have a for that runs for the pilot index inside a list of names, and that saves, for each value of the index a variable in an outer file. My problem is that I want the both the variable's name and the file's name to contain the name of the index, and I cannot obtain this behavior, as save asks for a name, not a command. My code would be something like A:=[a,b,c]; for i in A do cat(Mickey_,i):= something; #### that will correctly create Michey_a, Michey_b and Michey_c

Am I missing some justification for this last one?

> zip(`/`,Array([3]),Array([9]));
                                     [1/3]
 
> zip(`/`,Array([3],datatype=integer[4]),Array([9]));
                                     [1/3]
 
> zip(`/`,Array([3]),Array([9],datatype=integer[4]));
                                     [1/3]
 
> zip(`/`,Array([3],datatype=integer[4]),Array([9],datatype=integer[4]));
                            [0.333333333333333315]
Please help me Prims Code. Where am I wrong? Thanks. with(GraphTheory): G := Graph( { [{1, 2}, 3], [{1, 3}, 24], [{1, 4}, 35], [{1, 5}, 16], [{2, 3}, 5], [{2, 4}, 6], [{2, 5}, 17], [{3, 4}, 7], [{3, 5}, 38], [{4, 5}, 19] } ); DrawGraph(G); Prims := proc(G::Graph) local n, A, visited, i, j, k, min, a, b, T; k := 1; min := 999; T := Graph(0); A := WeightMatrix(G); n := NumberOfVertices(G); visited := { op( seq( 0, i = 1..n) ) }; visited[1] := 1; while k <>

Please help me DFS Code. Where am I wrong? Thank you.

 

Hello there Maple geniuses!

So I've been banging my head against these two problems for days and I was wondering if any of you had any idea how to proceed.

The first involves computing the limit of a series. The problem reads as follows:

"For large n, the sequence defined by

x1 = 2.30

xn = 9 * sqrt(xn-1+ 6)

approaches a limit. Find that limit correct to 15 significant figures, and then select the correct answer below."

 

I tried to do a Monte Carlo simulation with the Shuffle command from the Statistics package.

Unfortunately the distribution of the random sample differs significantly from the expected distribution even for large n.

Here is what I did:

Please help me BFS Code. Why am I wrong?

I tried the following:

restart;
with(Statistics):
Y9 := RandomVariable(LogNormal(a, b)):
assume(a::real, 0 < b):
c9:=solve({mu = Mean(Y9), sigma^2 = Variance(Y9)},{a,b}, UseAssumptions);

 

And received the following warning:

Warning, solve may not respect assumed property 'real' on 'a'.

 

How do I force Maple to account for property 'real' on 'a'?
 

Hi, Very new to Maple and am struggling with the basics, despite having read the manual(s). :-/ I want to enter the following expression in 2D Math: (a+b)*(b+c) and get back the following result from Maple: ab+b^2+ac+bc Instead, Maple gives me several different permutations of distributing a and b. I've tried all the "simplify" commands and none of them gives me the b^2. Ideas? Thanks in advance, n

I want to solve several systems of equations and force Maple to account for the assumptions which were made for the used parameters.

For example I tried the following:

restart;
with(Statistics):
Y1 := RandomVariable(Beta(nu, omega)):
assume(0 < nu, 0 < omega):
c1:=solve({mu = Mean(Y1), sigma^2 = Variance(Y1)},{nu,omega}, UseAssumptions);

Now the problem is, that UseAssumptions makes a distinction of cases, even if -like in this case- the results do not differ from each other.

First 1992 1993 1994 1995 1996 1997 1998 Last Page 1994 of 2431