MaplePrimes Questions

Hello there, 

Would you allow me to a question regarding the correct way of using 'alias?

In the attached worksheet, an alias is defined, then a. the defined alias is not working (please have a look at the line with the same comment), b. the alias works in the other way around (please have a look at the line with the corresponding comment, Alias is working backward). When I tried to substitute the function with the 'subs' command (please have a look at the expression 'Desired'), then I was able to get the result, expected from alias command. 

Perhaps, I am confused with how the 'alias' command works. I would appreciate it if the correct way is explained. 

Thank you, 

In Kwon Park 

Maple Worksheet - Error

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

Download Q20210724.mw

 

Hello everyone,

I am presently carrying out some computation of which I intend to solve some equations and get the preceeding values. But it would appear that my maple software just keeps showing evaluating without actually producing any results for hours even days. Is this due to my low laptop specs? 

I would love if the community can take a look at the code, and possibly run it to see if it's ok. I have attached the code for reference. 

Thank you.

 


test.mw

 

Hi,

    here a problem when i solve equations.i guess solve lost a root.how can i do.


An_unexpected_solve_bug_.pdf
Download An_unexpected_solve_bug_.mw

I'm having an issue with MacOS Big Sur 11.4 recognizing a package from saved documents. The package works great from new documents! 

Specifically: 
I've followed the instructions on 
https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/reference/initialization
to add  a .mapleinit
file to my user home directory under MacOS Big Sur 11.4

The .mapleinit file has code as follows to run the VLA package: 
VLAlibpath := "/VLA/library/":
libname := `VLAlibpath`, libname:
and I have the VLA package files with the library inside of it in my home directory too. 

When I open a new Maple document and run and use the package, it works just fine! 

The problem though is that if I save the Maple file and reopen it, it will no longer recognizes the package. I get: 
Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received VLA

It is very odd since the file still recognizes the libname just fine:
libname;   "VLA/library/", "/Library/Frameworks/Maple.framework/Versions/2021/lib"

The workaround is to copy and paste into a new document and start a fresh but that is obviously not ideal. 

Any ideas? It is a really really old package, but great for visualization.

Thanks,
Sarah

Hi! Do you know how to compute this point of intersection? I thought that would be points given from

solve(f(t)=g(t),t)

but it's not true. I don't want to calculate this numerically because I think it should be seen from formula but ofc I can be wrong.

I'll give the code below:

restart;
with(plots);
f := t -> exp(t) + exp(-t^2 - 2*t);
g := t -> exp(-t^2) + exp(-t^2 - 2*t);
display(plot([f(t), g(t), t = -3 .. 3], discont = true, color = red), pointplot([[2, 2], [exp(-1) + exp(1), exp(-1) + exp(1)]], color = blue, symbol = solidcircle), view = [0 .. 6, 0 .. 4], plot([2, t, t = 0 .. 4]));

 

 


Hi,

I am currently working on structural dynamics problem where I'am trying to obtain the dynamic response of a high-rise building.

To do so I am working in the frequency domain where I was able to find my solution and now I want to obtain the solution in the real time domain by using the inverse fourier function. 

Now the problem comes when applying the inverse fourier transform. The expression which I am trying to tarnsform is extremely long and so Maple requires a lot of time. I tried to run it but after half a day it would still be evaluating. Would there be a way to speed up this process? I attached the worksheet if you're interested.

Thanks in advance :)

nieuw.mw

I have a system of PDEs from Mathematica as a list of equations stored in a text file. I would like to bring it to Maple to solve it. I know how to use , however, I want to import or read the file without displaying its content (being too big), and assign it to a Maple variable. Is there a way of doing it on Maple.

It seems that DrawGraph cannot display the weights of more than 45 arcs of a directed graphs (the arcs themselves are keeping to be displayed correctly).

Maybe a version issue?

WeightedGraphs.mw

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 

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:=Graph(Matrix([[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, 1, 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, 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 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.

 

1 2 3 4 5 6 7 Last Page 1 of 2044