Items tagged with maple maple Tagged Items Feed

For example, given a 3d point p(x,y,z), with (x,y,z) as its coordinates. Then it is transformed by rotation and translation, as 

p'=R(p)*p+t(p), where R(p) is a 3x3 rotation matrix that is a matrix of functions of p, and t(p) is a 3x1 vector function of p. 

My question is how to derive dp'/d(as a 3x3 matrix) using maple? 

To make it clear,I want to do it in a way that dp'/dp = ∂p'/∂p + ∂p'/∂R*∂R/∂p +  ∂p'/∂t*∂t/∂p

And I'd like to know each intermediate quantity, such as p'/∂R, R/∂p.


Anyone can help?

Thanks a lot. 

Using Maple 18, I solved for minimum and maximum price. Instead of using fsolve I wanna use procedure programming structure in order to get the same results. How can I do it?

min_sol := fsolve([bc_cond, slope_cond, x[G, 1] = w[aggr, 1]], {p = 0 .. 1, x[G, 1] = 0 .. w[aggr, 1], x[G, 2] = 0 .. w[aggr, 2]}); p_min := subs(min_sol, p); max_sol := fsolve([bc_cond, slope_cond, x[G, 2] = w[aggr, 2]], {p = 0 .. 1, x[G, 1] = 0 .. w[aggr, 1], x[G, 2] = 0 .. w[aggr, 2]}); p_max := subs(max_sol, p);
{p = 0.3857139820, x[G, 1] = 127.8000000, x[G, 2] = 38.99045418}
0.3857139820
{p = 0.8841007104, x[G, 1] = 44.30160890, x[G, 2] = 164.2000000}
0.8841007104

Is there a command in maple that shows which files were read during start up? I am confused as to which maple init file is being read on my PC.  From http://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/reference/initialization

it says

"Under Windows, the initialization file is called maple.ini.
If <Maple>\lib\maple.ini exists, it is loaded first (where <Maple> is your Maple installation directory). With a  network installation of Maple, the commands in this initialization file will be executed by all users on the network.
To execute a user's personal set of commands, only the first initialization file in one of the following paths will be loaded.
1) The binary directory of your current working directory (for example, "c:\Program_Files\Maple\bin.win\maple.ini")
2) The <Maple>\Users directory (for example, "c:\Program_Files\Maple\Users\maple.ini")
3) The user's personal profile directory (multiuser only) (for example, "c:\Documents_and_Settings\userid\maple.ini")
      
Maple reads and executes the network initialization file before the personal initialization file."

How do I find out, from inside Maple, which file(s) were read? Or make maple shows a trace of the loading process to see what files ini files it is reading?

Maple 18.2 on windows. btw, the above help page seems old. I am on windows 7, and I do not have "c:\Program_Files\Maple\" folder. And do not have "c:\Documents_and_Settings" folder. So the above help is not very useful. May be it was written during windows 95 times?

A rigid rotating body is a moving mass, so that kinetic energy can have expressed in terms of the angular speed of the object and a new quantity called moment of inertia, which depends on the mass of the body and how it is such distributed mass. Now we'll see with maple.

 

Momento_de_Inercia.mw

(in spanish)

Atte.

L. Araujo C.

In this section, we will consider several linear dynamical systems in which each mathematical model is a differential equation of second order with constant coefficients with initial conditions specifi ed in a time that we take as t = t0.

All in maple.

 

Vibraciones.mw

(in spanish)

 

Atte.

L.AraujoC.

Compared to Maple on Windows, how do ppl like Maple on Macs ?

Any comments ??

 

Thanks, cheers !

(

OK, what am I doing wrong here?

This polynomial can be factored by almost anyone who knows algebra:

factor(x^2+y^2+2*xy);

but Maple refuses:

 x2  + y2  + 2 xy

but if I pose the question this way:

ans := expand((x+y)^2);

factor(ans);

(x + y)2

I get the expected result.  What is wrong with how I am using the factor?

Hi,

I am new to maple. I want to write the following codes in Maple in a file and execute it. I am writing the code in matlab. thanks

 

for i =1:1:5

for j=1:1:5

M(i,j)=i+j;

end

end

 

thanks

The equations of motion for a rigid body can be obtained from the principles governing the motion of a particle system. Now we will solve with Maple.

 

Dinamica_plana_de_cuerpos_rigidos.mw

(in spanish)

Atte.

Lenin Araujo Castillo

Corrección ejercico 4

 

4.- Cada una de las barras mostradas tiene una longitud de 1 m y una masa de 2 kg. Ambas giran en el plano horizontal. La barra AB gira con una velocidad angular constante de 4 rad/s en sentido contrario al de las manecillas del reloj. En el instante mostrado, la barra BC gira a 6 rad/s en sentido contrario al de las manecillas del reloj. ¿Cuál es la aceleración angular de la barra BC?

Solución:

restart; with(VectorCalculus)

NULL

NULL

m := 2

L := 1

theta := (1/4)*Pi

a[G] = x*alpha[BC]*r[G/B]-omega[BC]^2*r[G/B]+a[B]NULL

NULL

a[B] = x*alpha[AB]*r[B/A]-omega[AB]^2*r[B/A]+a[A]

NULL

aA := `<,>`(0, 0, 0)

`&alpha;AB` := `<,>`(0, 0, 0)

rBrA := `<,>`(1, 0, 0)

`&omega;AB` := `<,>`(0, 0, 4)

aB := aA+`&x`(`&alpha;AB`, rBrA)-4^2*rBrA

Vector[column](%id = 4411990810)

(1)

`&alpha;BC` := `<,>`(0, 0, `&alpha;bc`)

rGrB := `<,>`(.5*cos((1/4)*Pi), -.5*sin((1/4)*Pi), 0)

aG := evalf(aB+`&x`(`&alpha;BC`, rGrB)-6^2*rGrB, 5)

Vector[column](%id = 4412052178)

(2)

usando "(&sum;)M[G]=r[BC] x F[xy]"

rBC := `<,>`(.5*cos((1/4)*Pi), -.5*sin((1/4)*Pi), 0)

Fxy := `<,>`(Fx, -Fy, 0)

NULL

`&x`(rBC, Fxy) = (1/12*2)*1^2*`&alpha;bc`

(.2500000000*sqrt(2)*(-.70710*`&alpha;bc`-25.456)+(.2500000000*(57.456-.70710*`&alpha;bc`))*sqrt(2))*e[z] = (1/6)*`&alpha;bc`

(3)

 

"(&sum;)Fx:-Fx=m*ax"           y             "(&sum;)Fy:Fy=m*ay"

ax := -28.728+.35355*`&alpha;bc`

-28.728+.35355*`&alpha;bc`

(4)

ay := .35355*`&alpha;bc`+12.728

.35355*`&alpha;bc`+12.728

(5)

Fx := -2*ax

57.456-.70710*`&alpha;bc`

(6)

Fy := 2*ay

.70710*`&alpha;bc`+25.456

(7)

`&x`(rBC, Fxy) = (1/12*2)*1^2*`&alpha;bc`

(.2500000000*sqrt(2)*(-.70710*`&alpha;bc`-25.456)+(.2500000000*(57.456-.70710*`&alpha;bc`))*sqrt(2))*e[z] = (1/6)*`&alpha;bc`

(8)

.2500000000*sqrt(2)*(-.70710*`&alpha;bc`-25.456)+(.2500000000*(57.456-.70710*`&alpha;bc`))*sqrt(2) = (1/6)*`&alpha;bc`

.2500000000*2^(1/2)*(-.70710*`&alpha;bc`-25.456)+(14.36400000-.1767750000*`&alpha;bc`)*2^(1/2) = (1/6)*`&alpha;bc`

(9)

"(->)"

[[`&alpha;bc` = 16.97068481]]

(10)

NULL

 

Download ejercicio4.mw

Matlab seems to be pretty strong at doing color plots with separate color bars, e.g.

Is this also possible in Maple and somehow in combination with `plots[surfdata](...,color=zhue,...)`?

I have a nice family of functions of the form:

W:=(p,n,mu,w)->sum(w[k] * (n-k)* mu(n-k),k=1..n)

which can be evaluated for different p's using the operator mu*diff(...,mu)

The recursion begins with p=0 and proceeds using mu*diff(W(p,n,mu,w),mu) = W(p+1,n,mu,w).

Can anybody implement this procedure in Maple

Thank you 

The precise definition is that the distance between any two points of the rigid body remains constant. Although any body is deformed to move, if the deformation is small movement can be approximated by modeling it as a rigid body. Now let's see how Maple is part of the solution.

Cinematica_plana_de_cuerpos_rigidos.mw

(in spanish)

Atte.

Lenin Araujo C.

 

 

 

Hello fellow members. I recently got a new laptop, and installed Maple of course. Everything went smoothly until I attempted to approximate an answer.

I got the error message:

"[5] Error, invalid input: expected evalf[] index to be of type posint but received %ARG1"

Approximation works perfectly on my other computer and old laptop.

Any help?

Hey Everyone:

I was wondering what are your favorite and most useful code snippets that you often use. Maybe ones that are in your initialization code? Maybe ones that speed up something that you often do in maple? Maybe ones that you've seen on this and other websites and adopted for your own purposes?

For fun, I attach my init.mpl (.txt here, as .mpl attachments are not allowed by mapleprimes) here init.txt


Some of the snippets that I use the most are also listed below:

#rearrange curves inside an already created plot, so that certain curves are "on top" of the other ones.
#discussed here:
#http://www.mapleprimes.com/questions/201626-Order-Of-Curves-In-A-Plot
rearrangeCurves:= proc(
     v_items::specfunc(anything, PLOT),
     v_reorder::list([integer,integer]):= []
)
local p, curves, rest;
     (curves,rest):= selectremove(type, v_items, specfunc(anything, CURVES));
     curves:= < op(curves) >:         
     for p in v_reorder do
          curves[p]:= curves[p[[2,1]]]
     end do;
     PLOT(convert(curves,list)[], op(rest))
end proc:


#for numerical differentiation
#based on the idea from:
#http://www.mapleprimes.com/posts/119554-Data-Interpolation
#example use:
#alist:=[seq(i, i=0..10, 0.1)]:
#data:=map(x->evalf(sin(x)), alist):
#plot(alist, data);
#plot([cos(x), 'num_diff(x, LinearAlgebra:-Transpose(Matrix([alist,data])))'], x=1..10, thickness=5, linestyle=[solid, dot], color=[blue, red]);
num_diff:=proc(x, v_data, v_options:=[method=spline, degree=3])
 #v_data is a matrix
 #TODO: let the data be in a more arbitrary format that ArrayInterpolation understands, but keep x as first var
 evalf(D[1](x->CurveFitting:-ArrayInterpolation(v_data, [x],v_options[])[])(x));
end:

#extract nth columns/rows from a matrix
#these only work if have a 2d object... should be updated to also work
#with 1d row/column vectors
#Example use cases
#A := LinearAlgebra:-RandomMatrix(20, 20, outputoptions = [datatype = float[8]]);
#nthColumns(A, 2); #Every other column
#nthRows(A, 10)[.., 1..3]; #Every 10th row, but show only first 3 columns
nthColumns:=proc(v_m, v_n)
  v_m[..,[seq(i, i=1..rtable_size(v_m)[2], v_n)]]
end:
nthRows:=proc(v_m, v_n)
  v_m[[seq(i, i=1..rtable_size(v_m)[1], v_n)],..]
end:


#saves a png plot
savePlot:=proc(v_p, v_fileName, v_w:="800", v_h:="500")
    plotsetup("png", plotoutput=v_fileName, plotoptions=cat("quality=100,portrait,noborder,width=",v_w,",height=",v_h));
    print(plots[display](v_p));
    Threads[Sleep](2):
    fclose(v_fileName):
    plotsetup(default);
end:

 

we always have subscript variable in the math book, but how could this be natral done in maple

I want to get a seq aaa3

seq(a[i],i=1..3)

but how could I get a  aij

seq(a[i_j],i=1..3);

and

seq(a[ij],i=1..3);  both was not right

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