Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Maple 16:

Given Matrix A of size nRow,nCol, and a vector b of size nCol, I wanted to divide each value in column 
K by b(K) where k=1..nCol and the result will be a matrix B also of size nRow,nCol ofcourse.

For example, I want to do A[..,1]/b[1],  A[..,2]/b[2], etc.. for each column of A

The way I do it now is by using seq(), then convert the result to matrix, like this:


nCol := LinearAlgebra:-ColumnDimension(A):
B    := convert([seq(A[..,i]/b[i],i=1..nCol)],Matrix);

And it works.  But was wondering if there is a better way to do this. I tried to use apply map but did 
not know how to
Here is below the complete Maple 16 code I have:

------------------------
A := LinearAlgebra:-RandomMatrix(3,4);
b := MTM:-sum(A,1);
nCol := LinearAlgebra:-ColumnDimension(A):
B := convert([seq(A[..,i]/b[i],i=1..nCol)],Matrix);
MTM:-sum(B,1);  #verify the sum is 1

When I execute several times my maple code the program completely freezes, even though in the beginning of the code teh command "restart" is inserted. I work with matrices, perform integrations and derivations for their components and calculate eigenvalue problems. The freeze happens at no particulat block of execution.

 

Any thoughts?

which iterative method does maple use in fsolve command to solve nonlinear slgebraic systems?

When I type
                    printf(cat("Answer: ", sqrt(4)));

The result is Answer: 2. So, everything is OK.

However, if I type
                            printf(cat("Answer: ", sqrt(5)));

I got an error message: (in fprintf) format string expected....

So, I have a list of vectors v1,...v8 - and I want to consider all {0,1}v1 + {0,1}v2+ ... + {0,1}v8 (I need a list of all 2^8 possible combinations). 

 

I can run 8 simple for loops and use the mod command, but that's inconvenient. Is there a nice way to do what I'm trying to get done? 

Hello everyone,

 

I am coding the assumed modes method for vibration analysis on maple and I don't know why but the code takes veeery long time to execute and give results and I think it should not. There is also anoter very annoying thing. every 3 or 4 executions maple freezes completely and I am not able to find the cause...

I would be gratefull if someone could explain me if in my case it's better to working in floating point or rational values,...

Hello,

I have created a for loop in which I call often the same function let's say w(x).

Is it processed faster if I call each time the function, or if I apply the function to another variable, let's say W and call W each time?

Thanks

I need program of multiple shooting method with maple or algorithm?

Thanks alot.

Hello,

I am experiencing wrong results using the PolynomialIdeals package in Maple 16 (see radical_error.mw). Creating the same ideal with different generators, the radicals computed differ which of course is wrong:

with(PolynomialIdeals);
J := <t*(a+A), A*(b+B+t), b*(a+A), B*a-A*(b+t), (variables = {A, B, a, b, t})>:
J2 := <t*(a+A), A*(b+B+t), b*(a+A), B*(a+A...

The pyramid is the standard simplex in 3D with vertices (0,0,0),(1,0,0),(0,1,0) and (0,0,1). Ie it's the convex hull of these 4 points. Because Maple does not have "convexhull" plot command for 3D objects, so instead one has to plot a pyramid.

 

My commands:

                            with(plots);

 ...

Hi i have difficulty to obtain the function of theta(eta) and diff(theta,eta) form the matrix. Every time i have to take the values from the matrix inorder to make the function of theta(eta) and diff(theta(eta),eta) which is very difficult.

Can you please make a code in MAPLE so that i may get the direct fuction of theta(eta) and diff(theta(eta),eta)from the matrix gernerated by MAPLE.

i WILL WAIT FOR YOUR QUICK RESPONSE.

Hello everyone,

 

  I have a file, e.g.'helloworld.txt'. It cotains

 

hello 3 5 7
world 1 2 6

 

 If I use

  L1:=readdata(`D:\helloworld.txt`,3):
print(L1);

 I just got a "[]"

 

How can I get the data from the file which has many word?

 

Thank you very much in advance

 

The MRB constant can be computed in Maple by evalf(sum((-1)^n*(n^(1/n)-1),n=1..infinity)).

On my laptop restart; st := time(); evalf(sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity), 500); time()-st gives a timming of 37.908 seconds.

Using the procedure posted at the bottom of this message st := time(); A037077(500); time()-st gives a much faster timing of 1.903 seconds.

My fastest timing for 500 digits of MRB comes from my...

Hi guys, my Maple version is 15.01, when I want to do the following plots, the Maple pops up this failure "Kernal Connenction Lost":

Here're the corresponding input commands:

J := u -> evalf(Int(1/(sqrt(x^2+u^2)*(exp(sqrt(x^2+u^2))+1)), x = 0 .. infinity));

plot(exp(-2*J(Delta/(.4))), Delta = 0 .. 1);

Does anyone encouter the same problem if you try the commands? I wonder how to fix it, thank you.

 

F := [x1/(1+t^2)+x2, -(x1+x2)*(1+1/(1+t^2)), -x3];
rho1 := [diff(F[1],x1),diff(F[2],x1),diff(F[3],x1)];
rho2 := [diff(F[1],x2),diff(F[2],x2),diff(F[3],x2)];
rho3 := [diff(F[1],x3),diff(F[2],x3),diff(F[3],x3)];
theta := Matrix([[rho2, -rho1, 0],[rho3, 0, -rho1],[0, rho3, -rho2]]);
with(LinearAlgebra):
with(linalg):

evalm(theta&*Matrix([[M1],[M2],[M3]]));

Find M1 M2 M3

Answer is
M1 = [-1, -1, 0]
M2 = [1, 0, 0]
M3 = [0, 0, -1]

First 1562 1563 1564 1565 1566 1567 1568 Last Page 1564 of 2223