Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I want to show which parts of a sequence of plots were obtained later.

The program, written with a huge help from Mapleprimes forums (thanks!) draws some (for example, 200 but it varies) small plots and then paints all of them on one picture. It would be more clear if one could see what happened first. I am thinking of different colours for consequtive plots but not sure that know how to use them well.

If it may be important, the program is below. I would appreciate any help.

 

printlevel := 4;

iter := 200;

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?
 

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.

How to find all Hamiltonian cycles of >G:=CartesianProduct(CycleGraph(k),PathGraph(n));? The command >IsHamiltonian(G);  finds only one such a cycle and this is enough in the most cases. There is a command HamiltonianCycles[G, All] in Mathematica 7 , but I don't find any single command to consruct the Cartesian product of graphs there ( k and n may be large numbers).

First 1806 1807 1808 1809 1810 1811 1812 Last Page 1808 of 2224