Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi everyone!

I have a question: what is the simpliest way to generate colorbar for spectrogram?

Now I use "valuesplit" to assign dependece "z"-value from color.

My programm. My test file: "Signal.txt".

filtered_spectrogram.mw

Signal.txt

P.S. I use Maple 2016.

Helle everybohy,

I need to setup a metric tensor in 3-d but with the varalble r, theta and phi.  So I try this:

>with(Physics); Setup(mathematicalnotation = true, dimension = 3)

>Setup(coordinates = spherical[r, theta, varphi], metric = M)

where M is the metric that I need to use.  But the last command does not work.  Il I don't write [r, theta, varphi], it work but it's r, theta and t.

Any hint on this please?

Thank you in advance for your help.

Mario Lemelin

mario.lemelin@cgocable.ca

all
I need your help  to give an answer to  this question
I would like to construct a matrix with condtion that comes in picture
How can i do this with maple????
my matrix is n+1*n+1

In this post I want to present an easy method to obtain a discrete parametrization of a surface S defined implicitly (f(x,y,z)=0).
This problem was discussed here several times, the most recent post is
http://www.mapleprimes.com/posts/207661-Isolation-Of-Sides-Of-The-Surface-On-The-Graph

S is supposed to be the boundary of a convex body having (x0,y0,z0) an interior point and contained in a ball of radius R centered at (x0,y0,z0).
Actually, the procedure also works if the body is only star-shaped with respect to the interior point, and it is also possible to plot only a part of the surface
inside a solid angle centered at (x0,y0,z0).

Usage:
Par3d(f, x=x0, y=y0, z=z0, R, m, n,  theta1 .. theta2,  phi1 .. phi2)

f           is an expression depending on the variables x, y, z
x0, y0, z0  are the coordinates of the interior point
R           is the radius of the ball which contains the surface,
m, n        are the numbers of the grid lines which will be generated
The last two parameters are optional and are used when only a part of S will be parametrized.

The procedure Par3d returns a MESH structure M, which can be plotted with PLOT3D(M).

Par3d :=proc(f,x::`=`,y::`=`,z::`=`,R,m,n,th:=0..2*Pi,ph:=0..Pi)
    local A,i,j, rij,fij,Cth,Sth,Cph,Sph, theta,phi, r;
    A:=Array(1..m+1,1..n+1,1..3,datatype=float[8]);
    for i from 0 to m do for j from 0 to n do
      theta:=op(1,th)+i/m*(op(2,th)-op(1,th));
      phi:=op(1,ph)+j/n*(op(2,ph)-op(1,ph));
      Cth:=evalf(cos(theta)); Sth:=evalf(sin(theta));
      Cph:=evalf(cos(phi));   Sph:=evalf(sin(phi));
      fij:= eval(f, [lhs(x)=rhs(x)+r*Sph*Cth, lhs(y)=rhs(y)+r*Sph*Sth, lhs(z)=rhs(z)+r*Cph]);
      rij:=fsolve(fij,r=0..R);  if [rij]::list(numeric) then rij:=min(rij) fi; 
      if [rij]=[] or not(type(rij,numeric)) then print(['i'=i,'j'=j], fij); rij:=undefined fi; 
      A[i+1,j+1,1]:=evalf(rhs(x)+rij*Sph*Cth);
      A[i+1,j+1,2]:=evalf(rhs(y)+rij*Sph*Sth);
      A[i+1,j+1,3]:=evalf(rhs(z)+rij*Cph);
    od;od:
    MESH(A);
end:

The procedure is not optimized, e.g.
- Cth, etc could be Vectors computed outside the loops
- Some small changes to use evalhf.

###### EXAMPLES ######

f1 := x^2+3*y^2+4*z^2 - x*y - 2*y*z - 10:
plots:-implicitplot3d(f1, x=-5..5, y=-5..5, z=-2..2);

M:=Par3d(f1, x=0,y=0,z=0,5,40,40):
PLOT3D(M);

f2 := x^4+y^4+z^4-1:
M:=Par3d(f2, x=0,y=0,z=0,5,40,40):
PLOT3D(M);

M:=Par3d(f2, x=0,y=0,z=0, 5,40,40, 0..Pi, 0 .. Pi/3): #Plot half of the top only
plots:-display(PLOT3D(M), scaling=constrained);

M:=Par3d(f2,      x=0,y=0,z=0, 5,30,30, 0..Pi, 0 .. Pi):
N:=Par3d(f2+0.01, x=0,y=0,z=0, 5,30,30, 0..Pi, 0 .. Pi):
plots:-display(PLOT3D(M), color=red):
plots:-display(PLOT3D(N), color=green):
plots:-display(%,%%, orientation=[-40,65,10]);

 

f3 := (x^2+y^2-1)^2+(z+sin(x*y+z))^4-120:
plots:-implicitplot3d(f3, x=-4..4,y=-4..4,z=-5..5, numpoints=10000);

Par3d(f3, x=0,y=0,z=0,5, 30,30):
PLOT3D(%);

Note.
The procedure could be used to plot locally around a point (x0,y0,z0)
One may use the spherical coordinates (theta0,phi0) and then call the procedure taking theta0-a .. theta0+a,  phi0-b, .. phi0+b  for the trailing parameters
The spherical coordonates can be computed using:

ThetaPhi :=proc(x,y,z, X,Y,Z)
    local r:=sqrt((X-x)^2+(Y-y)^2+(Z-z)^2);
    ['theta'=arctan(Y-y,X-x), 'phi'=arccos((Z-z)/r)]
end:

ThetaPhi(10,20,30, 11,21,28);evalf(%);

 

 

Hi all,

How to calculate this integral:

for k>0,m>0

Int(exp(-(1/2)*v/k)*v^3*exp((1/2)*v/m)*Ei(1, -(1000*I)*v+(1/2)*v/m), v = 0 .. infinity)

I'm  tried to take advantage of with(IntegrationTools) but I failed

and and I got a strange result ,like this:

Integral.mw

Can somebody execute this code on a powerful comp and report the result in MaplePrimes? That would be kind of her/him.


 

RealDomain:-solve(a^2+b^2+c^2+a*b+a*c+b*c-  (a+b-c)*sqrt(2*a*b+a*c+b*c)-(a+c-b)*sqrt(a*b+2*a*c+b*c)-(b+c-a)*sqrt(a*b+a*c+2*b*c));

Error, (in assuming) when calling '`resultant/modular2`'. Received: 'Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc'

 

``


 

Download want_for_execution.mw

How do I convince MAPLE to simplify this Euclidean norm? > (D[1](P))(rho, theta, phi); Vector[column](%id = 230612588) > Norm(%, 2); / 2 2 2\ \|cos(phi) sin(theta)| + |sin(phi) sin(theta)| + |cos(theta)| /^ (1/2) > simplify(%, trig); / 2 2 2\ \|cos(phi) sin(theta)| + |sin(phi) sin(theta)| + |cos(theta)| /^ (1/2)

In the TransformTetrad command we can use some parameters, including nullrotationwithfixedl_. However, the nullrotationwithfixedl_ parameter requires another parameter E. How do I enter parameter E?

Thanks,

Denis.

 

> restart; with(VectorCalculus);
> P := proc (rho, theta, phi) options operator, arrow; `<,>`(rho*cos(phi)*sin(theta), rho*sin(phi)*sin(theta), rho*cos(theta)) end proc;
> r[1] := proc (t) options operator, arrow; P(2, (1/2)*Pi, t) end proc;
> F := VectorField(`<,>`(x, VectorCalculus[`+`](y, R), z), coords = cartesian[x, y, z]);
> F[1] := evalVF(F, r[1](t));
                Vector[column](%id = 255051836)
> F[1] := evalVF(F, r[1](t));
Error, invalid input: VectorCalculus:-evalVF expects its 1st argument, F, to be of type {procedure, Vector(algebraic)}, but received Vector(3, {(1) = Vector(3, {(1) = 2*cos(t), (2) = 2*sin(t)+R, (3) = 0}, attributes = [space = (module () local _origin, _coords, _coords_dim; export GetCoordinates, GetRootPoint, Vector; end module)]), (2) = y+R, (3) = z}, attributes = [vectorfield, coords = cartesian[x, y, z]])

 

Hey,

    I'm doing a little experimenting on Maple and I want to display 3 Matrixes side by side with text explaining what is what. I have a for cycle in which 5 sets of 3 matrixes are made. And my goal is to display each of the 5 sets.
How would I go about doing that? I've tried the following:

display(Array(print(cat("Matriz A", k, AA[k])), print(cat("Matriz B", k, BB[k])), print(cat("Matriz D", k, DD[k]))))

But with this I end up getting this instead of what I want:

http://i.imgur.com/p087Upr.png

Any ideas are welcome, thanks in advance.

Rafael.

I found the following: 

Question:matrix multiplication element by element

Does this not apply to vectors?  If not what syntax is required?  I cannot seem to execute this simple operation which I can easily do in MATLAB.  If you have such a capability why is it not clearly documented in the HELP pages?

HI, I'm new to maple and am having trouble taking partial derivitives. I couldn't find anything in the documentation that seemed to resolve the situation, and can't be the first person to stumble through this part of Maple.

Namely, it seems like the exponential function causes an extra "ln()" term to show up in the solution. I've tried with e^(y) and exp^(y) but nothing seems to be working. When i use the same markup up in wolfram and matlab and Ti-CAS i get the "correct" solution.

I attached a screen showing my input and output.

thanks for any insight!

 

 

 

Dear Maple experts,

 

I would like to teach volume of solids generated by revolution of an area between two curves by washers & cylindrical shell methods uisng Maple technology to my students. In this regard, I request the Maple experts to provide easy commands to meet my requirement.

 

With thanks & best regards.

 

Mr.M.Anand

Associate Professor in Mathematics

How do i implement Runge-Kutta of order 6 for a sytem of boundary value problems on maple

i could have sworn that when itegrating a gaussian maple will write it in terms of the erf functions... but i end up with:

gg:=A * exp( - ( (t - t0) / (tau) )^2 );
val1:=int(gg, t=-x0..x1) assuming t0::real, tau::real, x0<x1, t0>x0, t0<x1, x0::real, x1::real;  #or with no assumptions

 

the results is just gg unchanged... Doing:

convert(val1, erf)

does not help. I can set t0 (or transform it away), and it works, but I was hoping maple would not require this. 

Any thoughts how to help maple with this?

Mathematiaca can read my mind without issues:

 

First 1004 1005 1006 1007 1008 1009 1010 Last Page 1006 of 2216