MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Dear all, I calculated the eigenvectors of a unitary matrix with Maple10. (that is, I'm dealing complex vector space) Also, I computed it with C program made by myself. The eigenvalues coincide in two methods up to their order. But eigenvectors are different up to complex phase. Let me say, Let E_M(i) be the i-th eigenvector of the given matrix A calculated by Maple10 and let E_C(j) be the j-th eigenvector of A computed by the C program. Both of them are eigenvectors of A, that is, A&*E_M(i) = lambda(i)*E_M(i) and A&*E_C(i) = lambda(i)*E_C(i) are satisfied. But, dotprod(E_C(i), E_M(j)) != kronecker_delta(i,j).

    Let's continue on with the dice example; determining the probability of all faces showing when n dice are thrown.   We estimated this by running a simulation in maple; and comparing the frequency of successes to the total number of experiments.

    There is a way to determine the probability without running trials. The problem can be solved combinatorially.

    One way to determine the probability of all faces shown; is to determine the the probability that all faces are NOT shown (call this probability B). Then the probability that all faces are shown = 1 - B.

    I've been asked: how do I include a mathematical expression in a plot caption without having it evaluate? An example is displaying 2(x+y) in the caption without having it appear as 2x+2y. The easiest way to do this is to create an atomic identifier from the expression in the input line. In the 2-D input line, you'll have plot(..., caption=2(x+y)). Select 2(x+y) and right-click to bring up the context menu. Then go to 2-D Math -> Convert To -> Atomic Identifier. This turns the expression into a single name. Note that it is no longer equivalent to the expression 2(x+y), even though it looks exactly like it.
    Let's take another look at the dice rolling example:

    Simulate rolling 8 dice 10 times.

    roll := rand(1..6);
    for i from 1 to 10 do;
    dice := ['roll()' $8]; # dice contains 8 random values, each from 1..6
    end do;

    Let's say you want to check the list "dice" to see if all faces are
    represented.

    One way to do this is to write a proc which creates an array indexed
    1..6; and initialize the array to zero; and then check the dice list ...
    incrementing the associated array index for each value in the dice list.
    Finally ... check the built array to see if all index values are non-zero.

    Does anyone else see the following strange behaviour in the Maple 11 plot engine?

    I was acting in a Std GUI Worksheet, not a Document. (I use Maple for 64bit Linux, which may or may not matter.)

    1) In this next plot below, a (superfluous?) solid triangle appears. It lies in a xz-parallel plane at y=-1, with vertices (0.0,0.0,0.0), (1.0,-1.0,0.4), and (1.0,-1.0,0.0).

    plot3d(sqrt(1-y^2),x=1..2,y=-1..1,colour=red,filled=true,view=[-0..2,-1..1,0..1]);

    Hi, This is Jay Pedersen; a student a UNO in Omaha, NE. I have been using Maple for several years; and I appreciate its power to solve problems and I use it as a programming platform for solving mathematical problems. Here is a simple example: Simulate rolling 8 dice 10 times. roll := rand(1..6); for i from 1 to 10 do; dice := ['roll()' $8]; # dice contains 8 random values, each from 1..6 end do; I plan to submit an application shortly which determines the minimal sum for a boolean expression (in sum of products form (eg: abc + a' + bd'). All for now. -Jay
    A note added: Although the coding below is correct, it has clearly been superseeded by the following two entries contributed by acer: Entry 1 and Entry 2. As in any fairytale (even though this blog of mine certainly is not) it takes three of something (at least according to the fairytales of my fellow-countryman H. C. Andersen). Todays entry is the third and last (at least for now) in a row of three consecutive ones dealing with manipulations of indices of Arrays. The other two entries are Tip: Index an Array and Tip: Permute the indices of an Array.

    This is not so much a suggestion (I'm not sure if you should change it) but edited blog posts are booted off the front page. I edit sentence missing words and poor grammar and now it gone :)

    In Maple 11, we added the ability to put captions on a plot. To do this, just use the 'caption' option with any plotting command, in the same way you'd use the 'title' option. These options are described in the plot/options help page. One additional change we made in Maple 11 for these two options is to allow the right-hand-side of the option equation to be a list containing the title or caption, followed by a 'font' suboption. So now you can use title=["my title", font=[times, bold, 20]] instead of having to specify the font separately with the 'titlefont' option. You can also display 2-D math in captions, titles and other text elements in a 2-D plot. To do this, simply use the mathematical expression as the option value: e.g. caption=x^2/2. To combine math with plain text, wrap everything in a 'typeset' structure: caption=typeset("my plot of ", x^2/2). If you enter the plotting command in 2-D math, you can use the palettes to build the expression directly in the command.
    A note added: Although the coding below is correct, it has clearly been superseeded by the following two entries contributed by acer: Entry 1 and Entry 2 in the blog entry Tip: Transpose a pair of indices of an Array. Yesterday I wrote about a method to index an Array, using a procedure of the type `index/method`. Below, using the same sort of procedure, a method for permuting the indices of an Array is given (please feel free to suggest improvements; probably, the else-statement may be written more concisely):

    What is the largest linear system that Maple can solve? You might be surprised to find out. In this article we present strategies for solving sparse linear systems over the rationals. An example implementation is provided, but first we present a bit of background. Sparse linear systems arise naturally from problems in mathematics, science, and engineering. Typically many quantities are related, but because of an underlying structure only a small subset of the elements appear in most equations. Consider networks, finite element models, structural analysis problems, and linear programming problems.

    Sometimes it can be very useful to know the indices of entries (of an Array) which obey some conditions. The following procedure (which works for any Array) makes this possible:
    `index/makeIndex` := proc(indices::list,array::Array,value::list)
    	# Retrieving from the Array
    	if nargs = 2 then return array[op(indices)]: end if:
    	# Storing in the Array
    	if nargs = 3 then array[op(indices)] := indices = op(value): end if:
    end proc:
    
    An example: For Array A find the set S of indices of entries being positive integers, using as an intermediate step the Array B with entries of the form "indices = value":
    I am just getting started with Maple TA for Calc III. I am trying to solve LaGrange multipliers. When the solve command returns multiple sets of answers, how do I extract the specific values for the subs command? $f=xyz; $q=x^2+2y^2+3z^2-6; $g=maple("f+mu*$q"); $exp1=maple("diff($g,x)"); $exp2=maple("diff($g,y)"); $exp3=maple("solve({$q,$exp1,$exp2},[x,y,mu])"); $ans1=maple("subs({x = ????,),y =???? )},$f)"); $ans2=maple("subs({x = ????,y = ????},$f)"); The question marks are where I am lost.
    Hello, I have been using MAPLE 10 for a long time, now I switched to MAPLE 11. With both versions I have been using the standard worksheet. The programs which I wrote for MAPLE 10 work for MAPLE 11 also. However, in MAPLE 11 the graphs that are produced by the programs seem to have a worse resolution. What could be the reason for that? More precisely, I solve an ODE numerically and then plot the solution with the odeplot-command. Then, I save the graph as an eps-file (by right-clicking on it, selecting export and choosing eps). Using MAPLE 10 the eps-graph has an excellent reolution, not so when I use MAPLE 11.
    First 234 235 236 237 238 239 240 Last Page 236 of 306