Items tagged with package package Tagged Items Feed

In Maple, I seem to keep finding commands in different Maple build-in packages that does the same thing. Which is very confusing for someone trying to learn Maple.

Maple seems to have good things in it, but at the same time, it strikes me as a large bag with lots of tools and commands thrown in with little sense of coherence. One needs one command from one package to finish the job started using a command from a different package, and an option from one place to patch something done with a command from another package.

Here is one example. I wanted to obtain the diagonal of a matrix. So far, I found 3 commands that do the same exact thing:

A:=Matrix([ [1,2,3],[4,5,6],[7,8,9]]);
MTM:-diag(A);  #1
LinearAlgebra:-Diagonal(A);  #2
Student:-LinearAlgebra:-Diagonal(A);  #3

I am sure if continue to look, I might find another command to do the same thing hiding in some other package.

The problem for new user like me, is how does one decide which comand to use. This is the same as with constructing a Matrix. There is the Matrix([[]]) notation and metod, and there is the <<>> notation that does the same thing but with different and conflicting syntax.

Having many commands that do duplicate things is not a good thing at all. Commands should be axiomatic and orthogonal to each others. I think there should be a document that describes from a high level all these packages, may be as a block diagram with arrows that show the relation, if any, between them, and how they interact and when to use one vs. the other.

Is there a reason for this duplication of functionality? Does any one at Maplesoft look at such issues?

 

I do not like to load a package using with() and then use its commands and functions, since I then lose track knowing from which package a function or command being used in the code came from when I look at the code later on. So I like to write

pkg:-f() or pkg[f]() instead of with(pkg); f()

This seems to work most of the time, except I just found a case where I am forced to do with(pkg) at the top. Here is the example. I'd like to know if there is a workaround where I can avoid with(pkg) in this case as well:

restart;
f:=t->piecewise(t<0,0,t>=0 and t<z,t,t>z,z):
r:=convert(f(t),Heaviside):
r:=inttrans[laplace](r,t,s);


Now since Maple does not know what z is, it could not fully evaluate the result above (I can handle this with assumptions, but this is just an example). So now I replaced z by 0.5, but since laplace is not loaded, it still could not do it:

r:=subs(z=0.5,r);

So now I had to load the package, just to simply the above expression:

with(inttrans);
r;

This all becuase the expression earlier was left with only "laplace" in it, and not "inttrans[laplace]" as I typed. (why this happend, I do not know).

My question is: How would you do the above, without loading the package? I really do not like loading packages as I said, and like to keep the name of the package attached to each function to help me know where each function is coming from.

 

I've been using a maple package (written by another author) on earlier versions of Maple.  Recently I have been trying to rewrite it so it's a bit more Maple 16+ friendly (since I've read that Maple is not forward-compatible). However, I have been experiencing similar strange behavior in both the original and my current version: 

After saving the module to my personal library, I load with(MyPackage). Most functions work fine (all but a handful out of dozens).  However, some functions won't be recognized (e.g., Coproduct(...) will return itself Coproduct(...)).  

HOWEVER, when I execute the code in the module in its own Maple worksheet, all functions are recognized and work perfectly.  I look at the difference in the code between the functions that work upon loading the package (using with(MyPackage) command in a separate sheet) and those that don't, and there is no difference.

I'm assuming I'll just have to cut and paste the hundreds of lines of code for my package into each sheet I'd like to use it in, since I haven't been able to find others experience this problem in the knowledge base.  I'm hoping someone will be able to help out, however.

Panel method package...

July 02 2014 Fab 5

Hi Maple users :)

do you know if exists a Maple package in order to perform a Panel method, for instance in the Hess-Smith version, for solving incompressible potential flow over thick 2d and 3d airfoil geometries?

Thank in advance for the help.

Take a look at this link.

Hi,

I have been looking at some new models of Casio Scientific Calculators and came across with "Fx-115es Plus" Model which seem to have a some sort of simple CAS(Computer Algebra System) built into it.


Two new features which i really liked were

(i) Ability to make any part of the expression inert and simplying the rest.

(ii) Fully Integrated Repeated decimal display for fractions.

 

I want to ask if there is any builtin commands that can achieve these two effects in maple.

I will give some example for each of these

(i) simplifying say 2^3*2^4 in maple gives 32.

but forexample if i want to make 2 in the bases inert then simplifying the result should give 2^7

if i make 3 inert then the result is 16*2^3

if i make 4 inert then the result is 8*2^4

another example say (2^3)^4 in maple gives 4096

but if i make 2 inert then the result should be 2^12

if i make 3 inert then the result is 16^3

if i make 4 inert then the result is 8^4

In this way it is possible to keep any interesting part of large complex expression unevaluated and simplifying the rest across it to maintain focus on the interesting part.

I know i can try to achieve this effect by using unevaluation quotes but they get messy and harder to track in large nested forms.

Another approach might be to replace the inert parts by explicit undeclared symbols with required assumptions and simplifying, but this is not it.

I know in Maple 18 they have introduced some package called InertForm or something, can it achieve this effect and also mark inert parts of the expression as grey like it is possible for some operators.

(ii) the example for the second is quite obvious, say given the fraction 237/14, evalf of this gives 16.92857143 but a result like 16.9Overscript[285714, _] is more closer to differentiation it from a irrational expansion. Sorry i donot know how to pretty print this here.

Another advantage is when i want to give some large repeating decimal expansion and have maple convert it to fractional form. Currently i have no idea how many times to repeat the decimals explicitly to make maple understand that it is a repeating decimal expansion.

I often use RegularChains and SolveTools package. SemiAlgebraic is extremelly useful to deal with polynomial equations. However, I need some similar to Mathematica's Resolve that allows me to eliminate some variables from the description of the set. Say we have some set decribed by: for all 0<x<1, p(x,z)> 0 where p is a polynomial in x and z. Is there any Maple command that allow us to remove x and give the set only n terms of z?

Hello: I'm looking over the Help section but I can not find a Maple package that has a command to compute the symmetric sum or the cyclic sum. I just started working with inequalities. Please could anyone recommend a package that allows me to compute expressions related to Muirhead's Inequality (see part 2 of  the answer:  http://math.stackexchange.com/questions/488967/majorization-muirhead)

Vector using package Physics, LinearAlgebra.

Vectores.mw     (in spanish)

I wrote the following code inside a code region in order to implement a scalar product for lists:

m:= module() option package; export `*`;
    `*`:= proc( a::list, b::list) option overload;
        return add(i, i  in zip((x, y)-> x*y, a, b));
    end proc;    
end module;
l1:=[1,2,3,4];
l2:=[4,1,0,5];
with(m);
l1*l2;

when i run the code I sometimes get the desired result ->26

but sometimes I get

I don't have any clue, where this weird behaviour comes from.

Any help would be greatly appreciated.

 

Hi everyone

I am currently trying to make my own simple package including a few procedures. So far I have been able to write some "code" that actually works when I open the document and hit "enter". I would, however, like to save the package so it can be accessed during any Maple session using the command "with". I have unsuccesfully tried to comprehend the Maple help pages regarding this question but I definitely don't want to mess things up.

This is what I have written:

mat := module ()
description "useful procedures for mathematics, physics and chemistry";
export AtomicWeight;
option package;

   AtomicWeight := proc (x) description "returns the average atomic mass of the naturally ocurring element";
   Units:-AddSystem(NewSystem, Units:-GetSystem(SI), u);
   return evalf(ScientificConstants:-Element(x, atomicweight, system = NewSystem, units))
   end proc

end module;

What should I do to save it correctly?

Thank in advance,
Mads


 

 

 

 

I installed the shared library from http://www.maplesoft.com/applications/view.aspx?SID=1691

and it seems to have loaded ok. Now I can do

with(share);
See ?share and ?share,contents for information about the share library
                               []

When browsing help, I noticed it has a function called IntSolve() for solving linear integral equations. Maple itself has function called intsolve() which is build-in.

Since Maple is case sensitive, I assumed when I type IntSolve() then it will find the shared version of IntSolve() automatically and not call Maple's own intsolve. And that is indeed what happed. I typed an example from the help on share as you can see


 

eq1 := p(x)-1/2*Int(x*y*p(y),y=0....1)=5/6*x;
IntSolve(eq1,p(x));
                             7775  
                             ---- x
                             7776  
intsolve(eq1,p(x));
                            p(x) = x

Ok, So one of them is a little wrong :).

But suppose I want to explicitly add the share library there, in the call, as prefix, so that when I look at the code later, I can see which function I am calling. How should one do this? I tried

share:-IntSolve(eq1,p(x));
    Error, `share` does not evaluate to a module
share[IntSolve](eq1,p(x));

 

The strange thing, is that this worked

IntSolve[IntSolve](eq1,p(x));

Basically, all what I want is to way to add the share name to all the calls somewhere, so I know, when looking at the code, which call is from which library or package.

Any idea how to do this? So to avoid any possible name clash since the share library seems large.

I am using Maple 17.02

I copied and pasted this from the example page and I have to get this same graph for an assignment

im using maple 17

 

Tangent(x^3-x, -.432, view = [-2 .. 1, DEFAULT], output = plot)

 

when i hit enter the return was

 


Tangent(x^3-x, -.432, view = [-2 .. 1, DEFAULT], output = plot)                       (1)

 

I want to create a package.  I want to be able to load it using the usual with(Accellib); construct.

how can i do it?

My question is a bit vague, but I hope someone can point me in the correct direction for a solution anyway. A Maple Package was been defined and placed in the Lib folder in Maple 16. The package does contain a number of custom defined functions, say Cos(v) and Sin(v) - with a capital letter to distinguish them from the usual built-in functions in Maple. After having called the package using the with statement, the new function works well in the worksheet. It also works...

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