Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi
I would like to matrixplot consecutive powers of a matrix. As the name of the matrix is not always the same I wrote a simple "embedded" procedure WM to do this.
This produre works well when called directly, but I don't understand how to make it work when called from animate
 

WM := P -> n -> plots:-matrixplot(P^n, heights=histogram):

U := Matrix(2$2, [0.8, 0.2, 0.4, 0.6]);
WM(U)(1);  #ok whatever the value of the argument of W(U)

plots:-animate(WM(U), [n], n=1..2);  # produces an error

# even this simpler command doesn't work
plots:-animate(plots:-matrixplot, [U^n], n=1..2)  # same error as above

Can you help me to fix this?

TIA

PS: I firstly defined WM this way

WM := proc(P, n)  plots:-matrixplot(P^n, heights=histogram) end proc:

but I met difficulties to tell animate that only n was the parameter to change

Hi,

I am using Maple in Document mode and I want to print my worksheet. Is there a possibility to show the page margins as an overlay so that I can adjust the lines of my worksheet in order to avoid automatic breaks making the print difficult to read?

This worksheet produces a very strange error.

I have examined every assignment and cannot find one which relates to the error message.

Can anyone help here?

Strange_Error.mw 

A manipulator, in which 3 degrees of freedom are provided by changing the length of the links and one degree of freedom, is provided by turning. Only 4 degrees of freedom. Solved using Draghilev's method. In one case, the length of the manipulator link could be expressed through the value of the 3rd coordinate. The lengths of the other two links are considered generalized coordinates. In this case, it is still obtained polynomial equations, as for the usual coordinates.
I was asked to make an example of the movement of such a manipulator using Maple. (Automatically, this is an example of solving an inverse kinematics problem.)
four_degrees_of_freedom_from_Sabina.mw

Good Morning,

    Can anyone explain how the Statistics:-nonlinearfit(Time Vector data points, weight at time t) can be used with a real time based (with units) set of vectors?

    To get the fit for an equation to data of the form A*(1+B)^t   with t being time and the growth in kg/sec  the solver needed to be unitless and I get the coefficents.  Reapplying unit of time blows up the eqn.

   P.S., I think I'm being math obtuse this morning on the units.  Maple_Primes_Question-worksheet_Units.mw

Thanks,

Bill

How to compute and simulate State transition diagram in markov matrix, long run behavior, statistical test analysis?

MArkov.mw

restart;
with(LinearAlgebra):
with(GraphTheory):

with(ListTools);
with(MTM);

g:=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 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]));

Eg := sum(evalf(abs(Eigenvalues(AdjacencyMatrix(g)))));
print(Eg);

DEg := sum(evalf(abs(Eigenvalues(AllPairsDistance(g)))));

print(DEg);

 

The evalf is taking too much it is running infinetly

Now for such matricies what to do 

Python can run it fast but i require it in maplesoft only 
Kind help if someone can help they will be acknowledged.

Hi friends, I have a problem. From a given number 'k' I want to generate a string 's' with the first naturals before the number k. Like this:

k := 5;

s := "01234";

I want to use the above in the following command:

(parse~@Vector[row]@StringTools:-Explode)~(StringTools:-Generate(k,s));

Thank you.

 

Hi friends, I have a set of polynomials, 'a', and I want to calculate the product of all possible combinations by taking 3 elements at a time. Like this:


a := {x+1,x+2,x^2+1,x^2+x+2}
a[1]*a[2]*a[3]
a[1]*a[2]*a[4]
a[1]*a[3]*a[4]
a[2]*a[3]*a[4]

I have a larger 'a' set so I was looking for a simple method to perform these operations.
Thank you.

I am happy to announce that registration for Maple Conference 2021, to be held Nov. 2-5, is now open! The event is once again virtual and free this year. On our home page, you can find information about our keynote presentations. Our keynote speakers this year are Dr. Veselin Jungic, Dr. Evelyne Hubert and Dr. Laurent Bernardin.

The Agenda & Event Format page contains preliminary information about the event and will be updated as the agenda develops. This page describes two add-on workshops that are also free of charge: "Maple Programming: Beyond the Basics" and "Advanced Problem Solving with Regular Chains".

You can register for both the conference and the add-on workshops here: Maple Conference 2021. I hope to see you all in November!

Hi,

I have a function of 3 variables (PiM) which I can use in plot3d given the first argument while the other two arguments are functions of the two variables I use in plot3d.

In the code I attached below, I am plotting 2 planes using plot3d, but I cannot implicitplot where these two planes intersect. COuld you please take a look at my code?

Thanks.

maple_primes_question.mw

 

 

Hi
I have a huge trigonometric expression in Maple with an approximate length of length(.)=397593353.

When I compute this expression in Matlab, I receive another expression with a much smaller length, and the reason is that Matlab is using subexpressions to calculate the main expression. However, I need to do this in Maple.

I have already tried to simplify, but it didn't work.
The maple worksheet & a screenshot of the Matlab subexpression is attached.

See below file for expression in maple (Please run the "Main.mpl" in the attached file.):

Ldiff.zip

And part of the expression in Matlab is shown in the below picture

Where the subexpressions (again in Matlab) are shown below:

Let a,b,c,d and E be constants.

Prove that Laplace{at^-c+bt^-d} = E{as^-c+bs^-d}

if and only if c+d=1 and E= +or-  sqr(pi*csc(c*pi))

Given the property of Gamma:

Gamma(p)Gamma(1-p)=pi/(sin(p*pi)), 0<p<1

This is from an old Schaums outline on Laplace Transforms.

By hand i get  E{as^-d+bs^-c}.

Cant figure out how to get Maple to express this.

Greeting to all of you, I'm having problem in searching for R in this silmutaneious equation. How do I solve this?

 

Please help me to solve the system of nonlinear ordinary differential equations with the help of the Homotopy perturbation method in MAPLE. I have attached a worksheet please check.  Please please help me.

Thank you

HELP.mw

First 9 10 11 12 13 14 15 Last Page 11 of 1847