MaplePrimes Questions

Hello,

Can anyone tell me why this Maple phaseportrait command returns the error below ? Thanks in advance !

 

with(DEtools);
phaseportrait(-2*x*y, [x, y], x = -1.5 .. 1.5, {[0, -2], [0, -1], [0, 0], [0, 1], [0, 2], [0, 3]}, y = -1 .. 3);
Error, (in DEtools/phaseportrait) system must have same number of dependent variables as DE's.
 

Hello

The calculation of the jacobian matrix is not working.

https://de.maplesoft.com/support/help/maple/view.aspx?path=VectorCalculus/Jacobian

Testes on windows, mac. worhksheet and document mode.

Maple 2017.

 

 

 

with(VectorCalculus)

[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, About, AddCoordinates, ArcLength, BasisFormat, Binormal, ConvertVector, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProduct, Flux, GetCoordinateParameters, GetCoordinates, GetNames, GetPVDescription, GetRootPoint, GetSpace, Gradient, Hessian, IsPositionVector, IsRootedVector, IsVectorField, Jacobian, Laplacian, LineInt, MapToBasis, Nabla, Norm, Normalize, PathInt, PlotPositionVector, PlotVector, PositionVector, PrincipalNormal, RadiusOfCurvature, RootedVector, ScalarPotential, SetCoordinateParameters, SetCoordinates, SpaceCurve, SurfaceInt, TNBFrame, TangentLine, TangentPlane, TangentVector, Torsion, Vector, VectorField, VectorPotential, VectorSpace, Wronskian, diff, eval, evalVF, int, limit, series]

(1)

Jacobian([rcos(t), rsin(t), r2t], [r, t])

Matrix(%id = 18446744078361292662)

(2)

``


 

Download DAROTIERTJACOBIANIMGRABSCHEISSEMA.mw

There seems to be patterns for sin(10^-k) for rational k;

Here we have the "floats."

n sin(10^(-n-1/2))

1 0.03161750640

2 0.003162272390

3 0.0003162277607

4 0.00003162277660

Hi!

Is it possible to create a vector, say

phi := Vector(2);
phi[1] := x[1]+2*x[2];
phi[2] := x[2]**2+x[1];

and then save it in a file that you can use in Matlab as a function handle?

I want to be able to create the phi vector in Maple but use it in Matlab.

Thanks for help!

 

Hi, 

Could the Maplesoft staff change the definition of the GammaDistribution in package Statistics?

In the all the papers or courses in the fiels of Probability or Statistics, the shape parameter is the first parameter of this distribution, while the scale (or "rate") parameter is the second.

From versions to versions the Maple definition of this distribution switches these parameters.
It's really a pain in the ass when you want to implement algorithms that use this distribution*

Thanks for your understanding


* for specialists, the Clayton copula uses as an ingredient a sample from Gamma(1/theta, 1) where theta is an adhoc parameter.
In Maple you must code s:=Sample(GammaDistribution(1, 1/theta)).

OK, you could reply me that once I know the trick it is the simplest thing at world to do the switch myself: nevertheless it's really boring, to say the least

1) start cmaple.exe;

2) type "proc(x, x);", and watch Maple die;

3) Request a refund from Maplesoft.

I am using command-line Maple cmaple.exe, I have been trying several hours to type the correct several characters to create a lambda function (anonymous function), but Maple's documentation is only for people using the GUI and gives no hint how to translate the right-arrow symbol into ASCII.

What is the secret, undocumented sequence of ASCII characters for defining an anonymous function via the command-line interface? (Why not document it in the user-manual, for those of who can't stand Maple's bad GUI?)

I have a maple code that has two output blocks giving a large number of numerical values for my experiment. I need these values to compare the output in both the code blocks and also to draw several figures using the data. On a single run of the program, a large number of values are obtained and then I manually copy them to excel sheet for further analysis. It takes a lot of my time to copy and paste the results on each run. I want to export the outputs of both the code blocks to a excel sheet. Any suggestion on this problem will be helpful to me. Thanks.

The link to my code is  maple-excel.mw.

I want the output in this format Book1.xlsx

Dear All,

I am having trouble with doing integration of a complex integrand with Maple 2016. The code is shown below. For simplicity, I have used a real function Psi00, but in general, it should be a complex function. Although I have assumed r to be real, in the final output, there is still an overhead bar on r^1/4. It is not recognized as real and is not multiplied on the r^5/4 factor to give r^3/2. May I ask you for help in solving this problem? Any of your help is highly appreciated!

Best,

Toby

assume(r, real); assume(phi, real);
Psi00 := exp(-(1/2)*r^2)/sqrt(Pi);
                             /  1  2\
                          exp|- - r |
                             \  2   /
                          -----------
                              (1/2)  
                            Pi       

int(int(conjugate(Psi00*r^(1/4))*Psi00*r^(1/4)*r, r = 0 .. infinity), phi = 0 .. 2*Pi);
    /   /             2 ______                          \\   
    |   |/   /  1  2\\   (1/4)  (5/4)                   ||   
    |   ||exp|- - r ||  r      r                        ||   
    |   |\   \  2   //                                  ||   
  2 |int|----------------------------, r = 0 .. infinity|| Pi
    \   \             Pi                                //   

What Maple type should I use so that test1 and test2 are always equal? (I use Maple 2017)

 

test1 := proc(x) type([op('x')], identical(['x'])) end;
MapleType := anything;
test2 := proc(x) type(x, MapleType) end;

 

Hi everyone,

I'm a beginner in maple and coding in general.

I'm making a model that need to solve a set of linear ODE in maple. Say I have model 1 and model 2.

In model 1, everything works fine and the results I get match with the experiments. However, when I modify model 1 into model 2 by adding 1 additional term multiplied by sigma (a constant) in the set of the ODE, The equations solved by maple produced complex number instead. 

May I know the reason why maple produces complex number as the result?

Please find attached the worksheet. SP1JH1B1.mw

The set of ODE are at the "longitudinal behaviour" section and the ODEs are deq2..6. When I set sigma=0 (basically back to model 1), maple gives me real number solutions again.

If I don't put "evalf" in front of value(dsolve(...)) (see sol_L), Maple produces `[Length of output exceeds limit of 1000000]`

Any help would be greatly appreciated.

Thanks in advance!

Hi,

Is it possible to write the title of a plot on two different lines with different fonts for each line?
For instance:

MyTitle := typeset("Identity function", "\n(illustration));
plot(x, x=0..1, title=MyTitle);

with the upper line  [times, bold, 14]
and the lower one   [times, roman, 12]

 

Hello all,

I am presenting some results in a small meeting tomorrow and I have a rather large symbollic matrix that I was hoping to be able to view in a more readable form (once you see my code, you will see what I mean). This should be a simple fix. Furthermore, when I use the Latex command to recieve code to import into latex, its not working properly, which makes me think I made some kind of mistake. I am really just trying to get this matrix in its full for so that it is easy for other people to read. Thanks for any help.Turns_Latex.mw
 

restart

with(LinearAlgebra)``

A := Matrix(5, 5, [0, 0, 0, 0, 0, -AXX*UU-AXY*VV-AXZ*WW, AXX, AXY, AXZ, 0, -AXY*UU-AYY*VV-AYZ*WW, AXY, AYY, AYZ, 0, -AXZ*UU-AYZ*VV-AZZ*WW, AXZ, AYZ, AZZ, 0, -AXX*UU*UU-AYY*VV*VV-AZZ*WW*WW-(AXY*UU*VV+AXZ*UU*WW+AYZ*VV*WW)*2+(-E+2*UVW)*AE, -AE*UU-VL2, -AE*VV-VL3, -AE*WW-VL4, AE])

A := subs(VL2 = -AXX*UU-AXY*VV-AXZ*WW, VL3 = -AXY*UU-AYY*VV-AYZ*WW, VL4 = -AXZ*UU-AYZ*VV-AZZ*WW, A)

A := subs(AXX = mu*(zeta__x^2+zeta__y^2+zeta__z^2+(1/3)*`#msup(mi("\`zeta__x\`"),mn("2"))`), AYY = mu*(`&zeta;__x`^2+`&zeta;__y`^2+`&zeta;__z`^2+(1/3)*`#msup(mi("\`&zeta;__y\`"),mn("2"))`), AZZ = mu*(`&zeta;__x`^2+`&zeta;__y`^2+`&zeta;__z`^2+(1/3)*`#msup(mi("\`&zeta;__z\`"),mn("2"))`), A)

A := subs(AXY = (1/3)*mu*zeta__x*zeta__y, AXZ = (1/3)*mu*zeta__x*zeta__z, AYZ = (1/3)*mu*zeta__y*zeta__z, A)

A := subs(UU = u, VV = v, WW = w, A)

A := subs(AE = mu*gamma*(`&zeta;__x`^2+`&zeta;__y`^2+`&zeta;__z`^2)/Pr, A)

Matrix(%id = 18446744078321522678)

(1)

latex(A)

 \left[ \begin {array}{ccccc} 0&0&0&0&0\\ \noalign{\medskip}-\mu\,
 \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt
\#msup(mi("zeta}}_{\mbox {{\tt x"),mn("2"))}}}/3 \right) u-1/3\,\mu\,
\zeta_{x}\,\zeta_{y}\,v-1/3\,\mu\,\zeta_{x}\,\zeta_{z}\,w&\mu\,
 \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt
\#msup(mi("zeta}}_{\mbox {{\tt x"),mn("2"))}}}/3 \right) &1/3\,\mu\,
\zeta_{x}\,\zeta_{y}&1/3\,\mu\,\zeta_{x}\,\zeta_{z}&0
\\ \noalign{\medskip}-1/3\,\mu\,\zeta_{x}\,\zeta_{y}\,u-\mu\, \left( {
\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt
\#msup(mi("zeta}}_{\mbox {{\tt y"),mn("2"))}}}/3 \right) v-1/3\,\mu\,
\zeta_{y}\,\zeta_{z}\,w&1/3\,\mu\,\zeta_{x}\,\zeta_{y}&\mu\, \left( {
\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt
\#msup(mi("zeta}}_{\mbox {{\tt y"),mn("2"))}}}/3 \right) &1/3\,\mu\,
\zeta_{y}\,\zeta_{z}&0\\ \noalign{\medskip}-1/3\,\mu\,\zeta_{x}\,\zeta
_{z}\,u-1/3\,\mu\,\zeta_{y}\,\zeta_{z}\,v-\mu\, \left( {\zeta_{x}}^{2}
+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{\mbox
{{\tt z"),mn("2"))}}}/3 \right) w&1/3\,\mu\,\zeta_{x}\,\zeta_{z}&1/3\,
\mu\,\zeta_{y}\,\zeta_{z}&\mu\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}
+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{\mbox {{\tt
z"),mn("2"))}}}/3 \right) &0\\ \noalign{\medskip}-\mu\, \left( {\zeta_
{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}
_{\mbox {{\tt x"),mn("2"))}}}/3 \right) {u}^{2}-\mu\, \left( {\zeta_{x
}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{
\mbox {{\tt y"),mn("2"))}}}/3 \right) {v}^{2}-\mu\, \left( {\zeta_{x}}
^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{
\mbox {{\tt z"),mn("2"))}}}/3 \right) {w}^{2}-2/3\,\mu\,\zeta_{x}\,
\zeta_{y}\,uv-2/3\,\mu\,\zeta_{x}\,\zeta_{z}\,uw-2/3\,\mu\,\zeta_{y}\,
\zeta_{z}\,vw+{\frac { \left( -E+2\,{\it UVW} \right) \mu\,\gamma\,
 \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2} \right) }{\Pr}
}&-{\frac {\mu\,\gamma\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta
_{z}}^{2} \right) u}{\Pr}}+\mu\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2
}+{\zeta_{z}}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{\mbox {{\tt
x"),mn("2"))}}}/3 \right) u+1/3\,\mu\,\zeta_{x}\,\zeta_{y}\,v+1/3\,\mu
\,\zeta_{x}\,\zeta_{z}\,w&-{\frac {\mu\,\gamma\, \left( {\zeta_{x}}^{2
}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2} \right) v}{\Pr}}+1/3\,\mu\,\zeta_{x}
\,\zeta_{y}\,u+\mu\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}
}^{2}+\mbox {{\tt \#msup(mi("zeta}}_{\mbox {{\tt y"),mn("2"))}}}/3
 \right) v+1/3\,\mu\,\zeta_{y}\,\zeta_{z}\,w&-{\frac {\mu\,\gamma\,
 \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2} \right) w}{\Pr
}}+1/3\,\mu\,\zeta_{x}\,\zeta_{z}\,u+1/3\,\mu\,\zeta_{y}\,\zeta_{z}\,v
+\mu\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}+\mbox {{
\tt \#msup(mi("zeta}}_{\mbox {{\tt z"),mn("2"))}}}/3 \right) w&{\frac
{\mu\,\gamma\, \left( {\zeta_{x}}^{2}+{\zeta_{y}}^{2}+{\zeta_{z}}^{2}
 \right) }{\Pr}}\end {array} \right]

 

``


 

Download Turns_Latex.mwTurns_Latex.mw

 

I am writing a small code to find median and mean. The code works for an even number of terms, not for an odd number of terms. I tried to find the error but cannot.

restart:medianmean:= proc(x) local a,b,c,d,m,g;
a:=sort(x); b:=nops(x); c:=nops(x)/2; d:=(nops(x)+1)/2;
m:=(a[c]+a[c+1])/2; g:=add(a)/b;
if (b mod 2 = 0) then evalf([a,m,g]) ;
else evalf([a,a[d],g]);
end if; end proc:

 

Hi,

I use the first example in the HeatMap help page.

restart:
with(Statistics):
RM := LinearAlgebra:-RandomMatrix(10):
HeatMap(RM);

I want to replace each tickmarks k (k=1..10) by cat(`A`, k).
So I do

NewTickMarks := [seq(k+1/2=cat(`A`, k), k=1..10)]:
HeatMap( RM, tickmarks=[NewTickMarks , NewTickMarks ] );

The horizontal tickmarks are displayed as expected: why the vertical tickmarks do not appear?

PS : HeatMap( RM, tickmarks=[NewTickMarks , default] ) changes the horizontal tickmarks without removing the vertical ones.

Thnks for the help
 

First 776 777 778 779 780 781 782 Last Page 778 of 2427