MaplePrimes Questions

@ASHAN's question was about a linestyle which wasn't displayed as expected.

Maybe a handling error on my part?

To ASHAN:

I was about to use a compact piece of code (subs(x =~ x(t), [d])) that makes names xi in an expression d functions of t (where i is a nonnegative integer); i.e. :
   xi -> xi(t)

The code works inside a procedure but not when passed as Maple input (see attachment).

What is the reason that it works at all?  Can my current way of replacing names by functions be improved?  

elementwise_equal.mw

How can we draw the pot function the same as in the attached figure (namely 'pot.png')? The values of V(x) may not be the same.

pot.mw

How to plot the following functions

plot(4*sqrt(L/g)*EllipticF(Pi/2, sin(theta0/2)), theta0 = 1 .. 20)

Hello

I am trying to calculate a definite integral of an absolute value function. I should get a positive result, but I end up getting a negative result. Why is this?

The line I am trying to run is this

ET2 := int(abs(1/(x - 2) + 0.5333 + 0.3333*x + 0.1333*x^2), x = -1 .. 1);

And the result I get is:
 ET2 := -0.056854377998556975271421429744140962019176108843917

What am I missing?

Hello;

Hope you are fine. I need to learn how can I call my code in the other file of maple, define new value for A and can get results. For this purpose, I just take an simple example as

questionmaple.mw

restart; A := 5; B := 10; AAA[0] := 10; for i from 0 while i <= A do AAA[i+1] := B*i*AAA[0] end do

5

 

10

 

10

 

0

 

100

 

200

 

300

 

400

 

500

(1)
 

``

Download questionmaple.mw

Is there a generalized compressibility chart in Maple?

Hello guys,

From time to time I use the procedure below to chain functions to the right of the expression to be evaluated.

`&/`:=()->args[-1](args[1],args[2..-2]):

For example:

(sin(x)^2+cos(x)^2)&/simplify                      1

For functions that work with just one argument, it's okay, but with functions that take more than one argument (like convert, subs), I don't know how to implement it.

0.76&/ convert(???,fraction)

(a*x+*x*b)&/simplify&/subs(a=2,b=3,???)

If someone more experienced can help, I'd be very grateful.

Oliveira

Let's say I have a file test.mpl file in the path ~/maple/Packages/MyPackage/test.mpl.

From the code in this file, I wish to save something to a file in the directory at the relative path ./Animations, which has absolute path ~/maple/Packages/MyPackage/Animations.

Now, on my machine, because I know the path to this directory I can easily save using the absolute path. 

What if I send this directory MyPackage (which is essentially a package) to someone else. Maybe they keep it in a different location such as ~/projects/maple-projects/MyPackage.

I would like that this person be able to run test.mpl and it will save the aforementioned something to a file in the relative location ./Animations, which on their machine is the absolute path ~/projects/maple-projects/MyPackage/Animations.

I am stuck on how to accomplish this.

I found out that if I am in a worksheet that is in the directory MyPackage then I can use interface(worksheetdir) to find out the path to the worksheet, so if everything were run from a worksheet contained in the MyPackages directory then I could use a relative path to the Animations directory. 

Problem is, the normal usage of test.mpl is to just create some new worksheet and read the file and use it. But a new worksheet like this is located in the home directory by default.

restart;

A:= Matrix();

A := Matrix(1, 0, {})

(1)

i_choices:= [seq(i,i=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(2)

j_choices:= [seq(j,j=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(3)

for i in i_choices do:
 for j in j_choices do:
   A[i,j] :=i+j;
   print(A[i,j]);
 od:
od;

Error, Matrix index out of range

 

Download test_Matrix.mw

I would ask, why is the value of the global variable changed in procedure?

for example, we first define a global A2 and a proc()
but the value of A2 is changed in proc()?

How to fix this error?

Dill_ABC_Model_PDE_System_Solution.mw

The attached Maple 2019  document attempts to solve a non-linear system of two coupled, time-dependent first-order PDE's, given a list of initial and boundary conditions.  The system models the optical transmittance through a thin photoresist layer whose transmittance changes upon exposure to the incident exposure energy, and hence, the cumulative transmittance through the layer is itself a function of both the exposure time and the distance traveled through the resist layer.  The list of fixed parameters, P, defines the characteristics of a particular photoresist (hereafter "pr") and an assumed exposure irradiance.

My first attempt towards a general solution without initial or boundary conditions (hereafter "ics" & "bcs") apparently "succeeds" (in that no error messages are thrown), however, the form of the solution is quite complicated and difficult (for me at least) to interpret.  I think I understand that the _Cn are undefined constants that require supplying ics & bcs to determine the solutions for the transmitted intensity I(z,t) & the normalized molar fraction of the photo-active component in the pr, M(z,t).  However I do not understand what the symbol _f refers to in the returned solutions.

I make a second attempt to solve the system numerically, supplying a list of the [ics,bcs] as arguments to Pdesolve, however the error message "Error, (in pdsolve/numeric/process_PDEs) PDEs can only contain dependent variables with direct dependence on the independent variables of the problem, got {Iota(0, t), Iota(z, 0), Mu(0, t), Mu(z, 0)}" raises the question of whether I have misunderstood the required syntax in using Pdesolve or that the system as posed is in fact insoluble by Maple.

I would appreciate any insights that readers of this post can contribute, as my experience using Maple and PDesolve in particular must be considered embryonic at best.

Scott Milligan

Is their way to create a Random simple directed graph using random graphs package

RandomDigraph function I dont see an option to restrict it to give only simple graphs

Kind help if any code or way I can do that

One more thing is I dont see any directed special graph in maple

I would like to read data from a google sheet document. I can download a local copy to excel format, but then I'm no longer tied to the origional file.

Let's say I am solving a system of differential equation numerically with dsolve. 

In psolve, I use the option output = Array(...), and I assign the result of the call to a variable p. Given my problem such calls can take a few minutes to run.

Later I use odeplot and pass in this variable p. In this workflow I am doing all this in a single worksheet.

Now, I'd like to run dsolve multiple times and save the results of calls to files so that I can plot them later (what I am actually doing is running some code using the Grid package, and I would like each parallel process to save the plot data).

It would actually be great if I could run this code as a batch file. I am not sure how to do this yet (I read about some command line mode that would be best for this). 

So my questions are

- What is the recommended way to save data to files for loading later on?

- Does the answer the the above question work in command-line mode?

5 6 7 8 9 10 11 Last Page 7 of 2177