Maple Questions and Posts Maple Questions and Posts Feed

These are Posts and Questions associated with the product, Maple

I’ve been having some issues working with large datasets / matrixes in maple 17.02 and 2015. My data consists of a 10^7 x 14 csv file with several lines of header information. Attached is a small sample. The ImportData assistant hangs while importing said file. The javaw process stops responding for a period of time then stops consuming cpu time. I’ve have successfully imported a file of the same format but reduced in size (10^6 x 14) with this same function. So I don’t believe it’s a formatting issue but rather its size.

Are there size limitations to the ImportData function?

The attached maple file has a test case in which the data set (sans header info) is created and exported as a csv file. The export time took longer than I expected (~2 hrs). I then attempted to import the file using two different functions. The ImportMatrix function successfully imported the test case file in approximately 20 minutes, however the ImportData functions seems to fail in the same way as it does importing my actual dataset. I haven’t successfully used the ImportMatrix function on my actual dataset; I’m assuming the header information is the source of the problem.

Are there other methods to import this data?

As stated above, I’m tried both maple 17 and 2015 both 64 bit versions running on an Intel i7 M620 @ 2.67Ghz, 8 GB ram (~ 6 GB avail), sata 2 ssd.

Thank you,

Ron

importtest.mw  Sample.txt

 

I have to solve a numerical problem and I was wondering how to make maple treat very small numbers as zero. Say I do not care about anything less than 10^-5, so maple should treat all such numbers as zero. How to set this behaviour for the entire session? Thanks!

 

Hi!

 

I am trying to solve a large nxl system of coupled differential equations. Maple seems to have trouble even for small n's so I wanted to know if anyone has any suggestions. Take the case of the following system of ODEs for my unknown functions f[0,0](x) and f[1,0](x). 

 

ODEs:= {diff(f[0, 0](x), x)+2.*f[0, 0](x)/x^5+.5000000000*f[0, 0](x)/x = -15.58845727*sin(.5773502693*x)/x^2+140.2961154*sin(.5773502693*x)/x^4-81.*cos(.5773502693*x)/x^3, diff(f[1, 0](x), x)+6.*f[1, 0](x)/x^5+1.500000000*f[1, 0](x)/x-1.*f[0, 0](x)/x = -15.58845727*sin(.5773502693*x)/x^2+25.98076212*sin(.5773502693*x)*(1/x^4)^(1/4)*exp(1/x^4)*GAMMA(.7500000000, 1/x^4)/x^2+140.2961154*sin(.5773502693*x)/x^4-233.8268591*sin(.5773502693*x)*(1/x^4)^(1/4)*exp(1/x^4)*GAMMA(.7500000000, 1/x^4)/x^4-81.*cos(.5773502693*x)/x^3+135.*cos(.5773502693*x)*(1/x^4)^(1/4)*exp(1/x^4)*GAMMA(.7500000000, 1/x^4)/x^3-20.78460970*sin(.5773502693*x)/x^6+6.000000004*cos(.5773502693*x)/x^5+62.35382908*sin(.5773502693*x)/x^8-36.00000002*cos(.5773502693*x)/x^7, f[0, 0](.1) = 1.503497680, f[1, 0](.1) = -.5011660086}

 

 

Following Preben Alsholm's suggestion from my previous thread I am using lsode[adamsfull], since no other method i have tried worked for this problem. I am currently using:

 

Sollsodefull:=dsolve({ODEs}, numeric, method = lsode[adamsfull])

 

and it seems to work. I am wondering if there is a way to optimize this, as I will be extending my problem to n and l much larger than order unity numbers, therefore my system will contain about 10^4-10^5 equations. Solving this symple system of 2 equations takes a bit less than a second, but still it takes some time for the processor on my MBP. I am affraid it will be a nightmare for the full problem. Whats the most optimal dsolve option for this kind of problem? Any ideas?

 

I have also attempted dverk78, rkf45,rosenbrock, lsode(without the adamsfull option), and all failed for this particular system. Errors were:

1. For rkf45: Error, (in f00) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

2. For dverk78: Error, (in Soldverk78) cannot evaluate the solution past .1, step size < hmin, problem may be singular or error tolerance may be too small

3. For rosenbrock: Error, (in dsolve/numeric/SC/firststep) unable to evaluate the partial derivatives of f(x,y) for stiff solution

4. For lsode without [adamsfull]: Error, (in Sollsode) an excessive amount of work (greater than mxstep) was done

5. For default method with stiff=true and inplicit=true options: Error, (in dsolve/numeric/SC/firststep) unable to evaluate the partial derivatives of f(x,y) for stiff solution

Dear all,

I want to use the Maple Compiler to improve the performance of some of my codes. To get used to it, I tried doing the examples from the ?Compiler help-page, but everytime I run the compiler, I get the error message:

"Error, (in Compiler:-Compile) compiler exited with nonzero status 1: 

Do some of you know a possible reason for this?

Thank you all.

Download test.mw

I am not aware if is a problem with me or else.

Have some questions about the select command and (possible) big tensorial expressions. I think it would be a simple question to manage, but I still have problems.

TensorEnergiaMomento.mw

Thanks a lot

When solving a nonlinear differential equation on some variable x, but using some other parameter w, I am finding on Maple some complicated solution, which I would like to simplify by making evident what is the x dependence, and where I can compact complicated functions of the parameter w alone into new constants. How can I do that automatically?

 

For example, to have

 

(sinh(w) + ln(w))*x 

 

to be automatically called

 

c*x

 

Thank you in advance.

Hello.

given this expression

T:=unapply((1/6930)*exp(-(1/7938)*(X[4]-933)^2)*exp(-(1/6050)*(X[2]-805)^2)/((1+exp((1/50)*X[4]-(1/50)*X[2]))*Pi),X[2]);

U := unapply(sum(T(X[2]), X[4] = 0 .. 3600), X[2]):

I want to display U, but not all 3600 terms. is there anyway to simplify/reduce this sum?

kind of like geo series a+ar+ar^2+ar^3+...+ar^(n-1)=sum(ar^k,k=0..n-1) can be reduced to a*(1-r^n)/(1-r)

 

Hello. Earlier, I asked about it, (see http://www.mapleprimes.com/questions/203573-How-To-Do-Simple-Operations-On-Tensors). However, not all I was able to understand. Below I will give a try, and maybe you'll show me where I'm wrong.

Also, I'm interested in how you can determine the components of the tensor in a different coordinate system connected with the original in any conversion. Thank for your help.

restart; with(Physics); with(DifferentialGeometry)

ds := Physics:-`^`(dx__1, 2)+Physics:-`^`(dx__2, 2)+Physics:-`^`(dx__3, 2)

dx__1^2+dx__2^2+dx__3^2

(1)

Physics:-Setup(coordinates = (X = [x__1, x__2, x__3]), dimension = 3, metric = ds, quiet)

[coordinatesystems = {X}, dimension = 3, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}]

(2)

g_[]

g_[mu, nu] = (Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 2) = 1, (2, 3) = 0, (3, 3) = 1}, storage = triangular[upper], shape = [symmetric]))

(3)

``

u__1 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(x__3, Physics:-`*`(x__1, Physics:-`^`(Physics:-`^`(r, 3), -1)))-Physics:-`*`(Physics:-`*`(1-Physics:-`*`(2, nu), x__1), Physics:-`^`(Physics:-`*`(r, r+x__3), -1))):u__2 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(x__2, Physics:-`*`(x__3, Physics:-`^`(Physics:-`^`(r, 3), -1)))-Physics:-`*`(Physics:-`*`(1-Physics:-`*`(2, nu), x__2), Physics:-`^`(Physics:-`*`(r, r+x__3), -1))):u__3 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(Physics:-`*`(2, 1-nu), Physics:-`^`(r, -1))+Physics:-`*`(Physics:-`^`(x__3, 2), Physics:-`^`(Physics:-`^`(r, 3), -1))):

`e__1,1` := diff(u__1, x__1):`e__2,2` := diff(u__2, x__2):`e__3,3` := diff(u__3, x__3):

`e__1,2` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__1, x__2)+diff(u__2, x__1)):`e__1,3` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__1, x__3)+diff(u__3, x__1)):`e__2,3` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__2, x__3)+diff(u__3, x__2)):

`e__2,1` := `e__1,2`:

`e__3,1` := `e__1,3`:

`e__3,2` := `e__2,3`:

  E := matrix(3, 3, proc (i, j) options operator, arrow; e[i, j] end proc)

Matrix(3, 3, {(1, 1) = e[1, 1], (1, 2) = e[1, 2], (1, 3) = e[1, 3], (2, 1) = e[2, 1], (2, 2) = e[2, 2], (2, 3) = e[2, 3], (3, 1) = e[3, 1], (3, 2) = e[3, 2], (3, 3) = e[3, 3]})

(4)

Physics:-Define(E[i, j])

{gamma[mu], E[i, j], sigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], delta[mu, nu], epsilon[alpha, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(5)

Physics:-TensorArray(%)

{E[i, j], Array(1..3, 1..3, 1..3, {(1, 1, 1) = 0, (1, 1, 2) = 0, (1, 1, 3) = 0, (1, 2, 1) = 0, (1, 2, 2) = 0, (1, 2, 3) = 0, (1, 3, 1) = 0, (1, 3, 2) = 0, (1, 3, 3) = 0, (2, 1, 1) = 0, (2, 1, 2) = 0, (2, 1, 3) = 0, (2, 2, 1) = 0, (2, 2, 2) = 0, (2, 2, 3) = 0, (2, 3, 1) = 1, (2, 3, 2) = 1, (2, 3, 3) = 1, (3, 1, 1) = 0, (3, 1, 2) = 0, (3, 1, 3) = 0, (3, 2, 1) = -1, (3, 2, 2) = -1, (3, 2, 3) = -1, (3, 3, 1) = 0, (3, 3, 2) = 0, (3, 3, 3) = 0}), Array(1..3, {(1) = x__1, (2) = x__2, (3) = x__3}), Array(1..3, {(1) = Physics:-Psigma[1], (2) = Physics:-Psigma[2], (3) = Physics:-Psigma[3]}), Array(1..3, {(1) = Physics:-d_[1], (2) = Physics:-d_[2], (3) = Physics:-d_[3]}), Array(1..3, {(1) = Physics:-Dgamma[1], (2) = Physics:-Dgamma[2], (3) = Physics:-Dgamma[3]}), Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})}

(6)

``

Physics:-Setup(dimension)

[dimension = 3]

(7)

NULL

Physics:-Define(E[i, j], query)

[E, [0, 0, 0], 0]

(8)

DifferentialGeometry:-DGsetup([y__1, y__2, y__3], M):

Phi1 := DifferentialGeometry:-Transformation(N, M, [y__1 = Physics:-`*`(Physics:-`^`(sqrt(6), -1), x__1)+Physics:-`*`(Physics:-`*`(2, Physics:-`^`(sqrt(6), -1)), x__2)+Physics:-`*`(Physics:-`^`(sqrt(6), -1), x__3), y__2 = Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__1)-Physics:-`*`(Physics:-`^`(sqrt(3), -1), x__2)+Physics:-`*`(Physics:-`^`(sqrt(3), -1), x__3), y__3 = Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__1)-Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__3)]):

NULL

 

Download 1.mw

I am trying to explore the equality of two lengthy expressions. Unfortunately, my relations that all are symbolic, are lengthy and I use 'verify' command to explore the equality of them. When I use this command the 'FAIL' message appears. Maybe it is because of lengthy expressions and Maple cannot exploring equality of them. I have attached the corresponding file. Does anyone know what's the real problem? Thanks in advance.

MMatrix.mw

Hello, 

is there a way I can use data (variables) from Maple environment in the Maplesim environment. 

I have a scirpt in maple that generates the robots joints angles and need to use them in the 3D robot built in maplesim. I know I can export/Import data, but this sounds redundant. Is there a way to simply use an input block as a source of the data in maplesim and have the variable name generated in maple used int. Similar to what Matlab/Simulink does.. 

 

 

thanks.

Могу ли я использовать Клен, чтобы найти конкретные решения, которые выражаются либо в начальных и эллиптических функций для систем обыкновенных дифференциальных уравнений. Например, вы можете получить в Maple решений (sub_Solve01, sub_Solve02) для систем, которые перечислены в файле?
exp01.mw

hello
i have a problem that you could help me
i have an expression that i want convert it to an expression according to the expression q[d] with maple
i have bellow expressions
B[d]:=(-d*w[1]+w[3])/(((-2*w[1]+w[3])^2)-((-d*w[1]+w[3])^2))
B[o]:=(-2*w[1]+w[3])/(((-2*w[1]+w[3])^2)-((-d*w[1]+w[3])^2))
A[o]:=w[1]*(alpha[o]-c[o]-t[o])+2*w[2]*e[o]
A[d]:=w[1]*(alpha[d]-c[d]-t[d])+2*w[2]*e[d]
q[o]:=B[o]*A[o]-B[d]*A[d]
q[d]:=B[o]*A[d]-B[d]*A[o]
i want simplify expression U[d] such as this one
U[d]:=w[1]*(q[d]*(alpha[d]-q[d]-d*q[o]-c[d]-t[d])-C)+w[2]*(e[d]*q[d]+e[o]*q[o])+w[3]*((1/2)*(q[d]+q[o])^2)
I'm looking to simplify U[d] according to the expression q[d]
please please help me

Hey,

Basically the problem is that when I try to derive a variable L, which is defined by a very big equation, Maple does not do the maple. But if I copy and paste the big equation it calculates everything perfectly. Could I get any insight on why is that?

The copy paste method is very space consuming.

Thanks in advance.

I have a system of pdes and solved numerically using pdsolve (numeric) command.

The system consists of four first order partial differentia equations.

for example u(x,t), R(x,t)....

what command should I give to the Maple and get the graph of u(x,t) at a specific point x_0?

For example, I need a plot for u(30,t).

Is it possible with the maple plot?

I really appreciate your help.

Thank you for reading this post. :)

 

1 2 3 4 5 6 7 Last Page 1 of 1013