# Items tagged with timetime Tagged Items Feed

### How to solve a system of time derivatives for a sp...

September 09 2014
1 1

For two angles a and b, and functions  and , I have a system of two equations,

and .

The actual equations (i.e. not in terms of  and ) are known but are ommitted because they are very long.

I need not the solutions but simply the time  at which . While I have inputted the full equations into Maple, I do not know how to ask it to find an expression for  in terms of the constants of the equation.

How would I ask Maple to find this time?

### How do I make a timer to record the seconds elapse...

September 04 2014
1 1

How do I make a timer to record the seconds elapsed between button clicks?

I would like to make a multiplication game for primary students and want to have it return a score that reflects how long it took to answer the question.  I've been through the help pages (i.e. the lunar lander module) so I know it can be done but I am a Maple novice and am having trouble replicating it.

### reducing computation time...

June 12 2014
2 5

I have a long and complicated expression (say Eq1). I have to solve the two equations (obtained by taking real and imaginary parts of Eq1) for two unknowns. Normally it take around a day on my i5 (3.1 GHz, 4 cores), 8gb ram desktop. I looked into posts related to parallel programming but couldn't get much to reduce the computation time. Is there a way to reduce the computation time ?

### Error, (in f) unable to store .......................

May 27 2014
0 2

Hello Hello everybody
I have to solve the following differential equation numerically

 > restart:with(plots):
 > mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :
 > eq1:=(mp+mb)*diff(x(t),t\$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t\$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t\$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))-F*sin(omega*t)=0;
 (1)
 > eq2:=(mp+mb)*diff(z(t),t\$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t\$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t\$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)-F*sin(omega*t)=0;
 (2)
 > eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t\$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t\$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t\$2)+[Ip+mp*l^2+mp*d*l*cos(alpha(t))]*diff(alpha(t),t\$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;
 (3)
 > eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t\$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t\$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t\$2)+(Ip+mp*l^2)*diff(alpha(t),t\$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t\$1)^2*sin(alpha(t))=0;
 (4)
 > CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;
 (5)
 > solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);
 Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

Help pleaase!

thank you !!!

### How do import a table of data into a time series?...

May 05 2014
1 9

I have a table of data arranged in the following columns: Year, Jan, Feb, Mar,..,Dec in Excel or csv

I would like to import this data into a time series in Maple so I can plot the result.

What is the simplest way of doing this?

### When I make RUN the results change in code, ...

April 28 2014
0 6

Hi,

When I run two times my code, the results change.

Have you any idea, why???

### animation plots, movies...

April 13 2014
0 0

Hi,

thank for any  help.

I need you help to make a movies ( animation)  according to the index k=1..10.  k is used in Vect_T[k], vector of time to make an animation of the true solution, and it's also used in Matrix(M[..,..,k]), h

True solution:ow can I make a seq of plots for different value of k.

plot3d(True_solution(x,y,Vect_T[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]);

Analytic solution

plots:-matrixplot(Matrix(M[..,..,k]),axes=boxed,tickmarks= [[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],default],labels=[x,y,u],axes = boxed);

I tried, this:

S:=seq(plots:-matrixplot(Matrix(M[..,..,i]),labels=[x,y,u],axes = boxed),i=1..10):
plots:-display(S);
But I get only one figure.

also,

I tried

BoxTrue:=Null;
for k from 1 to 10 do
BoxTrue:=BoxTrue, plot3d(True_solution(x,y,Vector_time[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]): od:
display(BoxTrue, insequence=true);
also, no display

### visualization of the lattice...

April 09 2014
0 0

Dear all;

I need a help in this question.

u(x,y,t) my solution of PDE. x,y space, and t=time.

In the case without t. .i.e. u(x,y). Here is a visualization of the lattice u(x_i,y_j). i=1..3, anf j=1..3.  Please try this example, it's working.

my question, if i would like to add a third variable t, i.e.  and get u(x_i,y_j,t_k)  on each points. I would like to show the lattice in (x,y) plan for each t_k. I Think I will get many parallel lattice.

Please can some one, modify this code to get the parallel lattice. Thanks.

with(LinearAlgebra):
with(plots):
with(PDEtools):
interface(rtablesize=20):

Here,

L := 'L':
N := 'N':
g := 'g':
Z := i -> -L+2*L/(N+1)*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);

N := 4;
L := 1;
r := L/(N+1)/4;
ngon := (n,x,y,r,phi) -> [seq([x+r*cos(2*Pi*i/n+phi), y+r*sin(2*Pi*i/n+phi)], i = 1 .. n)]:
p[1] := display([seq(polygonplot(ngon(4,Z(0),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(N+1),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(i),Z(0),r,0),color=magenta),i=1..N),

seq(polygonplot(ngon(4,Z(i),Z(N+1),r,0),color=magenta),i=1..N),

seq(seq(polygonplot(ngon(20,Z(i),Z(j),r,0),color=white),i=1..N),j=1..N),

textplot([seq(seq([Z(i+0.1),Z(j),typeset(u[i,j])],i=0..N+1),j=0..N+1)],align={above,right})],view=[Z(-1)..Z(N+2),Z(-1)..Z(N+2)],tickmarks=[[seq(Z(i)=typeset(x[i]=evalf[2](Z(i))),i=0..N+1)],[seq(Z(i)=typeset(y[i]=evalf[2](Z(i))),i=0..N+1)]],

axes=boxed,scaling=constrained,labels=[``,``]):
p[1];

### Time take to execute code...

January 15 2014
2 2

Hello guys, I want maple to show me the time taken to execute the entire 500 loops shown in the code below. I read maple help and was able to come up with the code  (just part of the whole code).

st := time[real]():

for k from 1 to 500 do

sol := LinearSolve(A, eval(b, [y[0]=y_init,z[0]=z_init])):
y_init:=sol[9]:
z_init:=sol[10]:
end do:

time[real]() - st;

my problem is that the time that shows varies/differs if i run it several times. I was expecting the same time interval of calculation. Am I doing something wrong?

### ploting matrix with time as value...

August 13 2013
1 1

Hi,

I'm very new to Maple and need some help.

I have a Matrix with the structure

M:= Matrix([[2013-08-13T00:29:24+0000,"text1"],[2013-08-14T00:29:24+0000,"text2"],[2013-08-15T00:29:24+0000,"text1"],[2013-08-16T00:29:24+0000,"text1"]])

and would like to plot this. Now problem one obviously is, it contains a timestamp. How can I use this in Maple? Second problem is, "text1" is a string, so I cannot use plotlist because it can not be converted to a float.

### Slow in eval when substituting numerical values in...

August 10 2013
0 5

Hi,

Say for a 126 by 18 symbolic matrix, substituting numerical values into the matrix DD1 takes about 10 seconds (using time() );

for a 62 by 16 matrix, take just about 1/5 second.

By when the matrix is about 254 by 20, it take much longer! More than a minute!

I never actually waited how long, but I am wondering if there is something wrong? Am I using the right command?

Say the matrix is DD1 with numpar:=[x=0.3,y=0.2,z=0.98,....]

January 30 2013
1 1

Hi,

I'm new in Maple and i've a project to do. I've to find at what time is 90% of the steady-state concentration of C achieved. And the eq is

z'=k(1/2-z)(1/3-z), where k=0.3.

So i had worked in Mathematica before and i know that it would look something like that in there:

eqn1 = 0 == k (1/2 - z[t]) (1/3 - z[t])

DSolve[Evaluate[{eqn1}], z[t]].

But i have no idea how to find this 90%. I hope that someone will...

### Controlling animations better...

October 11 2012
0 7

Dear Maple users

I like to use animations in Maple for different educational purposes. The other day I tried making an animation simulating a simplified Epicycle, which is a small circle with its centre running on a larger circle. The smaller one has a ball running on it with a constant velocity. I used the following code:

> with(plots);
> with(plottools);
> omega := 1; k := 5; R := 5; r := 2;
>
> plot1 := plot([R*cos(omega*t), R*sin(omega*t), t = 0 .. 2*Pi]);

### Problem with minimal time computation !...

August 13 2012
0 10

I provide a code that I tried to optimize (minimize the calculation time) several times, finally I succeeded to:

######   Define global variables
DGV:=proc()
global CI0P,CI1P,CK0P,CK1P,CK0G,CK1G;

CI0P:=Array([1,6.25,9.765625,6.781684,2.6490953,0.66227383,0.1149781,0.014665573,0.0014321849,0.11050809e-3,0.69067559e-5,0.35675392e-6,0.

### Is there a problem in my code?...

July 16 2012
0 1

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,...

 1 2 3 Page 1 of 3
﻿