## How do I get values out of the result of pdsolve f...

Hello all

I am new to Maple, and I am solving a system of two coupled partial differential equations using pdsolve, but I am having a hard time retrieving the solution evaluated at some point from the output. The output of pdsolve is a module, which appears to have different "methods" on it, including "plot3d" and "value". I can easily get a plot of my solution by using plot3d, but I don't know how to get a meaningful value out. For instance, if my solution is (f(x,y), g(x,y)), I would like to define H(x,y) = (f(x,y), g(x,y)), and be able to type H(10,10) into Maple to have my solution evaluated at that point. The result should be (1,1).

Here is a toy example:

firstEq := diff(f(x, y), x)+diff(f(x, y), y) = f(x, y)+g(x, y);
secondEq := diff(g(x, y), x)+diff(g(x, y), y) = 2*f(x, y)+g(x, y);
pdsystem := {firstEq, secondEq};

bv11 := f(10, y) = 1;
bv12 := f(x, 10) = 1;
bv21 := g(10, y) = 1;
bv22 := g(x, 10) = 1;
bvs := {bv11, bv12, bv21, bv22};

pdsolution := pdsolve(pdsystem, bvs, numeric, time = x, range = 0 .. 10);

pdsolution:-plot3d(x = 1 .. 10, y = 0 .. 10);
pdsolution:-value(10, 10);
Error, (in pdsolve/numeric/value) got additional unknown arguments {2}

Best regards.

## Hot to set a globals default value for a variable ...

In the test package below I want the the Value of Clr to be "B" when the package is loaded. How do I achieve that?

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

## Toward a portable module for using in Excel Addin...

Hello,

In my worksheet (dedicated to the calculations of mechanism geometry), i'm trying to have a more "POO" approach (Programming Oriented Object).

In this sense, I begin to get more familiar with module and package. Attached, you can find a worksheet which gives the idea of the structure of my code. With this code, the module is very useful for me to call some results (attributes in terms of POO).

My way of doing is :
1) at the beginning, i use Maple as a calculator that is to say that at each prompt, i calculate expressions.
2) i try to make modules so as to have a easier access to the data that I calculated.

However, as the definition of the expressions that I calculated are outside my module (for example, in the worksheet attached, i calculate the expression of Gamma and psi before in my worksheet and i retrieve these expressions in the module with "global"), i can not use this module independently of this worksheet and namely in a Excel Addin.

In fact, the module works if the worksheet has been launched one time and consequently the expression of psi and Gamma are in the kernel (or in memory i want to say).

Question:

How can I do to transform my module in a independent and thus portable module ?

One idea will be to copy/ paste all the geometric calculations which have been done line by line inside the module.
However, i have many lines in separated prompts and moreover, it is always convenient to keep the line by line approach in the worksheet to make some tests.

I look forward to hearing your tips.

Thanks a lot for your help

MonPackage_ProcModule_variante4.mw

## Difference between a Module/ functions structure o...

Hello,

So as to build a function which gives several outputs, i have made a code with this manner :

Input:=[i1, ..., in]

Output:=proc(Input);

export o1, o2, o3
o1=f1(Input);
o2=f2(Input);
o3=f3(Input);
end module

End proc;

By doing, output1:=Output(Input):-o1; , i obtained my result. However, as my structure begins with the procedure (proc End proc), I can't export my result in package.

For this reason, I'm thinking about changing the structure of my code by starting with the creation of the module and put all the functions inside.

Input:=[i1, ..., in]

Output:=module():

export o1,o2,o3;
option package;
o1:=proc(Input)
f1(Input);
end proc;

o2:=proc(Input)
f2(Input);
end proc;

o3:=proc(Input)
f3(Input);
end proc;

End module;

Can you give me your feedback on the two structures ? Do you think that the second choice Module->Functions is more appropriated ?

Thanks a lot of your help and feedback.

## How do I access attributes and members in modules...

Hi,

I want to write my first module, and I failed!  I create an instance of the class (module?)

myList := TestModule(3);                    # works.

But I've no acess to the members, since I use export! What's wrong?

myList:-get_n;
myList:-set_n(20);
myList:-run();

Error, `myList` does not evaluate to a module
Error, `myList` does not evaluate to a module
Error, `myList` does not evaluate to a module

# *****************************************************************************

TestModule := module()
export get_n, set_n, run;
local  n, result, ModuleApply, profileRun;
option package;
description "A testmodule";

# Constructor
ModuleApply := proc(n)
print("Calling of Module Apply...");
thismodule:-n := n;
result := [];
profileRun();
return result;
end proc:

# Implementation of member run
run := proc()
print("Calling of run...");
dummy := [];
for i from 1 to 20000 do
dummy := [op(dummy), i]
end do;
result := TRUE;
end proc;

# Implementation of member runprofile;
profileRun := proc()
print("Call of profileRun...");
CodeTools[Profiling]:-Profile(run);
run();
CodeTools[Profiling]:-PrintProfiles(run);
CodeTools[Profiling]:-UnProfile(run);
end proc;

# getter
get_n := proc()
n;
end proc;

# setter
set_n := proc(n)
thismodule:-n := n;
end proc;

end module;

## How do I make a package or module...

Hello:

I want to make a package or module. Not sure. I cant get my head around what to do. I have loads of formulas I would like to be able to use without going back through work sheets. At present just want to keep it simple.

Have loaded a sample work sheet to use

Intend to place package in Maple2016 library folder.

Library Folder

C:\Program Files\Maple 2016\lib

Points

 (1)

 (2)

 (3)

 (4)

 (5)

Line through 2 points

 (6)

Line

 (7)

Lines s

 (8)

Lines t

 (9)

 (10)

 (11)

Triple Quad Formula (3 colinear points)

 (12)

 (13)

 (14)

## Help me fix my mathematics maple code problem...

I need some help fix my mathematics maple code problem , I define everything my Procedures,and procedures run is ok, but when I using call functions for another procedures  I can not operator my program . For sure procedures is work and correct. if somebody can help me , I really appreciate you help.

## How to create a help for a module? ...

Dear All

Say I have created a Maple module called MYMODULE. This means that I have a .mpl file called

mymodule.mpl, with inside

MYMODULE := module()

export myfunction;

****

****

end module:

savelib(MYMODULE, "MYMODULE.mla"):

Hence I use it in such a way:

> with(MYMODULE);

[myfunction]

I want to associate a help to the function myfunction. I know that with Maple18 things have changed

but I am not able to find enough information online. Say I have a .txt file called help_myfunction.txt.

How can I enable this help for my function, so that at the command

the content of help_myfunction.txt shows up?

Many thanks,Simone

## Reconstructing code of package...

Hello,

I have .mla. package and I would like to create the source code associated to this package.

In the past, you have also help me to obtain the source code of procedure of the module.

Here the post where Carl Love has helped me :

http://www.mapleprimes.com/questions/203676-Open-A-Maple-Package

How can I do to create the complete source code of package directly ?

Is there a direct way enabling to not have to read one procedure by one procedure but to obtain the code source for all the package ?

## Table vs module when creating package...

Hello,

In the creation of package wrapping some procedures, may you tell me the differences between using a table or a module so as to wrap the procedures ?

In my case, it seems to me that table is more convenient since I can create with table packages while keeping my program with a structure of section, subsection, ...

But, I'm a beginner in the use of packages. Consequently, I'm very interested in your opinions on this question.

Thanks a lot for your help

## Add a Module in Maple...

Hello, guys

I am a totally new comer in this erea. I get a new module file and want to implement it into maple,here is the link:

After I downloaded the package, I didn't know the next step and I can't find a perfect solution to this case, maybe it is too easy.

Can some cool guys can help me, THX.

## Type check of parameters, take II...

The issue Type check of parameters was resolved using the depends modifier. As far as I can tell, this modifier is not allowed for expected or keyword parameters, though. Thus the issue seems to reemerge for these types of parameters. Consider the following test example:

`createModule := proc(V::Vector)   local dim := LinearAlgebra:-Dimension(V);   module()      export f,g,h;      f := proc( x::depends('Vector'(dim))              ) x end proc;      g := proc( x::expects('Vector'(dim)) := something ) x end proc;      h := proc({x::        'Vector'(dim)  := something}) x end proc;   end moduleend proc:createModule(Vector(4)):-f(    Vector(4));createModule(Vector(4)):-g(    Vector(4));createModule(Vector(4)):-h(x = Vector(4));`

The function f is just a restatement of the already resolved issue, compare the above link, while the functions g and h are for the expected and keyword parameter cases, respectively. The problem remains the same: the variable dim is not evaluated for g and h. What to do? Does there exist a solution equally satisfactory as the one for f?

## Type check of parameters...

Consider the following two test procedures for creation of the same module:

`createModule1 := proc(dim::posint)    module()        export det;        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);    end moduleend proc:`

and

`createModule2 := proc(A::Matrix(square))    local dim;    dim := RowDimension(A);    module()        export det;        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);    end moduleend proc:`

as well as the following code lines calling these:

`createModule1(       2 ):-det(IdentityMatrix(2));createModule2(Matrix(2)):-det(IdentityMatrix(2));`

The first line executes unproblematically, while for the second line an error results concerning the dimensionality check 1..dim,1..dim of the matrix. Why is dim available/initialized in the first version, while not in the second?

## List of all the contents a MapleSim module GetMult...

Hello,

I would like to know : how I can get all the contents of the module GetMultibody of MapleSim?

Is there in classic maple a function enabling me to ask the content of a module ?

Thank a lot for your help.

## How does DiffTutor work?...

Hi,

i have been looking to see if i could get the source code for some of the calculus functions in maple. So far, i have tried this

kernelopts(opaquemodules = false)

interface(verboseproc = 3)

print(DiffTutor)

which shows the result

module() ... end module

does anybody have any idea how i would:

1) get the full list of sub-procedures in the module

2) get the source code of any of the sub-procedures in the module?