## Where is the question about the pseudo inverse of ...

Not the first time that a question (OP's name  PhearunSeng ) is removed as I am writing an answer (I guess other people have already faced the same inconvenience).
Why doesn't exist a mechanism which prevents removing, deleting, displacing a question where someone (here Carl) has akready given an answer ???

Whatever the reason, here is my answer

Title: Can be done quickly if you write the matrix in a more abstract form

```MyKGff := Matrix(5, 5,
{
(1, 1) = A+(1/63368)*B,
(1, 2) = -(1/63368)*B,
(1, 3) = -(1/39605)*B,
(1, 4) = 0,
(1, 5) = 0,
(2, 1) = -(1/63368)*B,
(2, 2) = (1/63368)*B+C,
(2, 3) = (1/39605)*B,
(2, 4) = -C,
(2, 5) = 0,
(3, 1) = -(1/39605)*B,
(3, 2) = (1/39605)*B,
(3, 3) = (8/198025)*B,
(3, 4) = 0,
(3, 5) = 0,
(4, 1) = 0,
(4, 2) = -C,
(4, 3) = 0,
(4, 4) = C+(1/63368)*F,
(4, 5) = -(1/39605)*F,
(5, 1) = 0,
(5, 2) = 0,
(5, 3) = 0,
(5, 4) = -(1/39605)*F,
(5, 5) = (8/198025)*F
}
);
```

Then (Maple 2015.2)

```PseudoInverse := CodeTools:-Usage( LinearAlgebra:-MatrixInverse(MyKGff, method=pseudo) ):
memory used=28.38MiB, alloc change=68.00MiB, cpu time=312.00ms, real time=314.00ms, gc time=24.90ms
```

To recover the pseudo inverse with original data do

```Rewrite := [
A = (D__pile*W[1] . E__c)/3000,
B = (D__pile*W[2] . E__c)*89^(1/2),
C = (D__pile*W[3] . E__c)/1000,
F = (D__pile*W[4] . E__c)*89^(1/2)
]:

eval(PseudoInverse, Rewrite):```

## How to import matplotlib in Maple's Python interpr...

I would like to be able to use python's matplotlib from Maple. I am doing the following currently

with(Python)
Start('home' = "/opt/anaconda3/lib/python3.9", 'path' = "/opt/anaconda3/lib/python3.9/site-packages")
ImportModule("matplotlib as mpl")

and the error I get back is

Error, (in Python:-ImportModule) ModuleNotFoundError: No module named 'matplotlib'
['Traceback (most recent call last):\n', '  File "<string>", line 1, in <module>\n', "ModuleNotFoundError: No module named 'matplotlib'\n"]

The string I passed into path is the directory where matplotlib seems to be located as far as I can tell. I looked this up in my IDE Spyder, but using the command print(matplotlib__file__).

UPDATE: but actually if I open a new worksheet and execute

with(Python)
Start('home' = "/opt/anaconda3/lib/python3.9", 'path' = "/opt/anaconda3/lib/python3.9/site-packages")

The error is that

Error, (in Python:-Start) unable to start Python: could not create process, mpython

So Maple isn't finding Python apparently.

I tried for 'home' also "/opt/anaconda3/bin", did not work.

## Frame around expressions....

Hello guys.
Is there any way to frame the styles: Input 2D, Output 2D and Text?

Oliveira.

## Will anyone be able to speed up this code even mor...

A robust largescale index-1 DAE (and stiff ODE) solver has been developed in Maple.
Details about our approach are provided in a paper just submitted.
See arxiv at
https://arxiv.org/abs/2212.02630

We encourage everyone to test these codes and report bugs. All the examples can be run with Intel's Pardiso (provided users have access to libraries) by calling DAESolverP.txt and by calling "IMPDAEP" instead of "IMPDAE". This is useful for large-scale problems. The symbolic capability and ListTools search capability of Maple are very good and can be used for developing optimization solvers as well.

I would like to know if CPU time/memory usage can be reduced significantly. In particular,  for examples 5 and 6. Some ways to contribute include

(1) Running the code in evalhf or compiled form. This may be hard.
(2) Providing options to run other parallel open-source linear solvers (eg., MUMPS).

(3) Other examples that show the use of the developed solver. We are able to solve > 100,000 DAEs.

(4) Helping in converting the code to Maple 14 or earlier (by doing sparse LU Decomposition. Just using LinearSolve will slow down the code).

Please avoid ~,*, etc (shortcuts) unless it improves the speed of calculation.
Thanks
Dr. Venkat Subramanian

## How do I get the result from a QuestionDialog - re...

Trying to use the following question dialog

with(Maplets[Elements]);
maplet := Maplet(QuestionDialog("Is x > 0?"));
result := parse(Maplets[Display](maplet));

Displays question with Yes and No buttons but whichever button is clicked the result is always false.  This was based closely on an example from the documentation.

So, how can I tell which button was clicked.  Also, the close button could have been clicked - how should that be dealt with?

## How to Convert a Worksheet to a Document?...

Hello guys.

Is there any way to convert a worksheet to a document and vice versa?

Regards,

Oliveira.

## fenchel conjugate transform...

xwhat is the fenchel conjugate transform of f(x)=x*x2*x3 over xi in R?  the general question is what is the fenchel transform of a polynomial that is not a quadratic?

## another problem with simplify. Throws exception fi...

Fyi, this looks like a bug.

But I do not know if it is new or not. I am using Maple 2022.2 on windows 10

Why it fails first time?

(ps. unable to paste content of worksheet here. looks like forum is not working, will paste an image)

Here is the code also in plain text

```restart;
delMdelY:=-2*y^2/((x^2 - y^2)^2*(x - k*sqrt(x^2 + y^2))) - 1/((x^2 - y^2)*(x - k*sqrt(x^2 + y^2))) - y^2*k/((x^2 - y^2)*(x - k*sqrt(x^2 + y^2))^2*sqrt(x^2 + y^2));
delNdelX:=-2*x/(x^2 - y^2)^2;
if simplify(delMdelY - delNdelX)=0 then
print("ok");
else
print("not ok");
fi;

```

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/simplify_fails_in_proc.mw .

## Maple Flow - Problems printing documents...

Hello,

I am having problems printing Maple Flow documents. I have set up both a header and a footer. In the Print Preview mode, everything is fine. When I try to print to a PDF file, the header loses its format and the footer does not print at all. Printing to a printer looks the same. What settings must be selected so that the printout can be passed on as a well-formatted document?

Many thanks in advance.

## Mapel Learn "Steps" button question - No Integrati...

I have been using Maple Calculator on my phone and found that the "Steps" to solutions option was useful, particularly for integration. However, I spend more time on my computer than phone and thought that Maple Learn would be even better. When I tried the free version of Maple Learn the "Steps" button never appeared. I thought this might be because it is only available with a subscription, so I have subscribed for one month to evaluate. However, after doing that the "Steps" button still did not appear. After a bit of digging, I found the Steps documentation and found you must open specific documents from the Maple Gallery for different problems to get the Steps button which seems a bit odd when the Maple Calculator does this automatically. Worse still there does not seem to be an option for integration!

Although I can see a lot of benefits with Maple Learn this seems to be a backward step (pardon the pun). Also, even though I have subscribed to Maple Learn, I still do not appear to have Premium on my phone in the same account. Again, a little disappointing.

Have I misunderstood something or is this the way it is?

Will

## How I Find the reproduction number and make a grap...

please, help me..this is my model

## ExcelTools:-Export causing crash and forcing use o...

I have a fairly simple worksheet with a 56x2 matrix M1 which I am trying to export to Excel with the following

ExcelTools:-Export( M1, "C:/Temp/M1.xlsx", 1, "B2")

This causes the following message to appear

After that the program is frozen and totally unresponsive.  The only way to proceed is end the task in Task Manager..

I am trying to upload the worksheet but am not sure if I have succeeded

## What type of memory is running out when I try to d...

I created a Github repository with files to reproduce the example that my question is based on.

I am using Grid:-Run to compute a 10000x3 matrix in each of 100 parallel runs. I then average the 100 matrices to obtain a final 10000x3 matrix, which I saved to an .m file.

It contains a variable called with the matrix.

Each row of the matrix is a 3d point, and the entire matrix represents a trajectory on a sphere. I'd like to display an animation of this trajectory. Now, my question is not about how to do this, but rather about the memory requirements necessary to do so.

I can plot trajectories with, say, 1000 points, but apparently 10000 requires too much memory.

The Github repository I linked to contains an example of all of this.

The worksheet matrixTest.mw reads the matrix from the .m file and reads some procedures defined in the .mpl file that are used for creating the animation data.

Then, a call to the procedure animateMatrices basically calls plots:-display to display the matrix as an animation.

I've been able to display the first 5000 rows of the matrix.

What type of memory is running out when I try to display the animation of the full 10000 rows?

Here is a screenshot of my Activity Monitor right before I get the

Error, out of memory error while processing result

## Simplification of polynomials on radicals....

Hi! I need to simplify a polynomial over an arbitrary field F on a radical variable ν, such that for some power j, ν is in F.

the polynomial takes the form:

k0+a1ν1/j+...+anνn/j

but, since νj is in F, this divides every element νi/j into a cotient group of order j, so this can be rewritten as a radical extension of F, in the form:

k1+(a1+...)ν1/j+...+(ak+...)ν(j-1)/j

where ki, ai are in F. I feel like this is a very straightforward technique for handwritten algebra, but i can't see a command for this on Maple 18. Nor the simplify(..., radicals) Or the combine(...,radicals) seems to help here. Maybe there's an special command for this? Must i do it myself? Please, any help is aprecciated.

## Why is there this difference between calling plots...

This question is based on the following worksheet I created specifically to show my question: Animation_Test.mw

Unfortunately, MaplePrimes gives me an error when I try to insert the contents here directly.

Basically my question is about the syntax of plots:-display.

I have a sphere

sphereDisplay := plottools:-sphere([0, 0, 0], 1, transparency = 0.9);

and something which is the result of calling plots:display on a sequence of two other other plots:-display.

arrowAndTrailDisplay := plots:-display(seq(plots:-display(computeArrowPlotFrame(m, t, red), computeTrailPlotFrame(m, t, windowSize, red)), t = times), insequence = true)

You can see in the attached worksheet what computeArrowPlotFrame and computeTrailPlotFrame are, but they are basically lists of plot structures. arrowAndTrailDisplay is thus an animation containing two different sequences of frames.

I wish to have Maple plot the sphere and the animation together. This works as expected (a static sphere and the animation of an arrow and a trail of the path of the tip of the arrow)

plots:-display([sphereDisplay, arrowAndTrailDisplay]):

but the following does not work as expected (instead it plots each frame separately)

plots:-display([arrowAndTrailDisplay])

adding insequence=true to the latter makes it work. But my question is why do I have to add that? I can't understand, from syntax standpoint why the former plots arrowAndTrailDisplay as an animation but the latter does not.

 1 2 3 4 5 6 7 Last Page 1 of 306
﻿