Annonymouse

160 Reputation

6 Badges

10 years, 329 days

MaplePrimes Activity


These are questions asked by Annonymouse

Given a list with sublists e.g.

[[a,b],[[c,d,e]]]

is there a way of merging everything into a single list, for example

[a,b,c,d,e]

Hi

I have a Vector of polynomials in x[1] and x[2]; and I want to use coeffs to get the coefficients of bothe elements of the Vector; using the command:

Eq2Coeffs := `~`[coeffs](%, [x[1], x[2]])

bizarely the result i get is something in terms of x[1] and x[2].

Here is the worksheet this problem emerged in, the specific command is 3.8.

Interestingly solves runtimes vary by orders of magnitude when new equations are added to it. Interestingly in one of the cases shown here when  a larger more complex equation is added it runs orders of magnitude faster.

This graph shows the runtimes of solve on my laptop, as i pass it more members of a family of equations. Notably runtime jumps up by an order of magnitude at 4 but then reduces when i add the next equation, despite it being a much longer and more complex one



The worksheet this is taken from ,where you can see all the arguments passed to solve is here.

I have two matrices, one of the dimension of solution space that i have been using solve to navigate
this matrix will look something like:

M := matrix([[3, 2, 1], [2, 1, 1],[2, 1, 1]])

and I have another matix of the times that it takes solve to find these regions:

N := matrix([[.2, .4, .8], [.3, .6, .5], [.8, 2.3, 2.6]])

I'd like to find the sets {N[ij]:M[ij]=m for some integer m}; that is I'd like to get all the elements of N on entries of M with the same number so i can start thinking about them statistiaclly.

i.e. for 3 i'd like the list [.2]

      for 2                      [.4 .3 .8]

and so on.
 

I have an 8*5 matrix, and i'd like to replace elements of it that are >20 with 20. For those interestedm, the matrix comes from this question.

M := Matrix(8, 5, {(1, 1) = 1.266, (1, 2) = .734, (1, 3) = .656, (1, 4) = .735, (1, 5) = 1.843, (2, 1) = 2.859, (2, 2) = 5.625, (2, 3) = 5.188, (2, 4) = 5.453, (2, 5) = 10.765, (3, 1) = 3.281, (3, 2) = 9.000, (3, 3) = 5.516, (3, 4) = 5.828, (3, 5) = 6.156, (4, 1) = 7.718, (4, 2) = 34.125, (4, 3) = 5.453, (4, 4) = 5.344, (4, 5) = 5.453, (5, 1) = 8.703, (5, 2) = 6.515, (5, 3) = 6.125, (5, 4) = 6.641, (5, 5) = 6.734, (6, 1) = 17.766, (6, 2) = 8.578, (6, 3) = 8.765, (6, 4) = 9.875, (6, 5) = 32.610, (7, 1) = 22.156, (7, 2) = 15.640, (7, 3) = 15.610, (7, 4) = 15.187, (7, 5) = 23.735, (8, 1) = 20.140, (8, 2) = 20.156, (8, 3) = 20.266, (8, 4) = 19.344, (8, 5) = 21.078})

I tried to create a logical matrix that i could input into M (this is how it works in maple) to select the elements so i could replace  them, but this didn't work 

4 5 6 7 8 9 10 Last Page 6 of 15