Items tagged with package package Tagged Items Feed

The physics package is pretty awesome, but one thing that would be a big help is some functionality for entering and resolving vectors in angle/magnitude format (50 angle 45 degrees, or what have you.) Is there a way to do this?

 

Thanks

 

Joe

Hello,

I have a Maple package which is a .mla file.

How can I open it to have access to the source code ?

I would like to open it in order to modify a procedure and to use it indepently of the package.

Thanks a lot for your help.

Dear all

I want to know, how one can install third party package into Maple13, the package is "wkptest" i downloaded it from link http://cpc.cs.qub.ac.uk/summaries/ADTY. If anyone knows how to do this please help.

I prefer to write packge:-command(....) so I can see which package the command is from.

But sometimes I am forced to load  a package. Here is an example. IntegrationTools contains some useful types

At load time the IntegrationTools package defines three new types: Integral, DefiniteIntegral and IndefiniteIntegral, which can be used to access integrals involved in any given expression.

I thought I can access these just like the commands in the package, using ":-" notation, but this does not work

------------------
restart;
v := Int(sin(x), x);
type(v,IntegrationTools:-IndefiniteIntegral);
---------------------

 

Error, IndefiniteIntegral is not a command in the IntegrationTools package

But this works

-----------------------
restart;
with(IntegrationTools);
v := Int(sin(x), x);
type(v,IndefiniteIntegral);
----------------

It looks like :- only works to access functions/commands/procs in a package. and not to access types such as in this example.

Is there some other notation to use to reference types in package without having to load the whole package?

    

Hallo. There is a package "Standard Form" (for Maple 3 & 4): http://www.cecm.sfu.ca/~wittkopf/

I am interesting if it can be converted for modern Maple 18?

 

I'm using MAPLE files, and a little to bored to run all commands in it.

Instead of it would be a bit easier to make a package.

Is there any post here how can I do it?

Hello everybody,

I will start a course in mastering QM in a MOOC format (Massive Open Online Course).  Up to now, I always do the calculation by hand and sometimes with the LinearAlgebra package.  But now I need to do the calculation more rapidly.  So I decided to learn how to use this package for this course.

 

The help system give a too generalized way to do it.  Even by looking the example, I didn't find praticle example to it.  So is there a generous person who could take a little bit of hi time to show me how to do it by using an exemple that yo will find attach to this post.

 

Thank you in advance for your trouble.

Besgt regards.

quantum_mechanics_DIRAC.mw

 

--------------------------------------
Mario Lemelin
Maple 18.2 Win 7 and Ubuntu 14.04 - 64 bits
MapleSim 7 Win 7 and Ubuntu 14.04 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Joe Riel,

I am interested in making some adjustments to the Syrup package to help tailor it to my needs (expanded error descriptions, variable partial differentiations, and others).   A little over a year ago I had some dialog about how to make Syrup changes, but the program I was working on at the time, cancelled the Maple effort...

I need guidance on (1) how the Maple code is structured so I may explore modest changes, (2) what suggestion do you have on the easiest/smartest code development environment, (3) how to compile the changed code, then (4) how to rerun the revised Syrup.

Thank you and happy holidays.
Jeff Belue

Update:

thanks for the answers below, I can now get listing of content of an .mla like this:

restart;
with(LibraryTools):
LibLocation:=cat(kernelopts(mapledir),"/lib/maple.mla");
ShowContents(LibLocation);

But could not yet find a command that actually lists the standard *.mla libraries that come with Maple. I have to go to C:\Program Files\Maple 18\lib and copy the name of each file with .mla extention in there to get its content. Is there a way to obtain a list of all the .mla files or the standard libraries so that to automate all of this? Otherwise, I'll just copy the names of all the mla files in the above folder and make a list of them manually.

original question:

in Maple, I can do ?packages to get a help page showing list of packages available. But I need a way to do this in code, and obtain result as list or set. Next I'd like to go over each package and also obtain list of all symbols and functions/proc in this package.

For example, once I get list of packages, I'd like to get list of functions in say algcurves package, so I should get ["AbelMap", "algfun_series_sol",.....].  The list can be just strings. That is ok, I am just trying to enumerate all packages and build-in commands and symbols in Maple. May be make a small report of it for documentation purposes and to get better idea what is in Maple.

What are the commands I need to get such lists?

I am using Maple 18.02 on windows.

 

Mytest:=module()
    option package;
    
    export
        mymain
        ;
        
        
    # local a,b,c;

    uses LinearAlgebra;
    
    interface(rtablesize=infinity);
    
    
    mymain:=proc(n::integer)

        local ans;
        
        ans:=Vector(n);

        return ans;

    end proc;

end module;

Here is a short piece of code to create a Maple package. It runs fine. Is that possible to hide the code from print() ?

 

with(Mytest);

print(mymain); # which displays the source code

 

Could I hide some of the code? Say I want to use the function mymain() for debugging purpose, but I dont want to make it local to the package. Instead I keep it in "export", but I dont want users to see its code.

 

Thanks!

@ecterrab 

I figured I'd start a new thread for odd things I come across whilst using the new physics package. 

I have found this, and am not sure if it is expected. 

 


restart

with(Physics):

Setup(mathematicalnotation = true):

``

Setup(Commutator(Psigma[i], Psigma[j]) = Physics:-`*`(Physics:-`*`(I, ep_[i, j, k]), Psigma[k]), AntiCommutator(Psigma[i], Psigma[j]) = Physics:-`*`(2, kd_[i, j]));

[algebrarules = {%AntiCommutator(Physics:-Psigma[i], Physics:-Psigma[j]) = 2*Physics:-KroneckerDelta[i, j], %Commutator(Physics:-Psigma[i], Physics:-Psigma[j]) = I*Physics:-LeviCivita[i, j, k]*Physics:-Psigma[k]}]

(1)

NULL

Psigma[1].Psigma[1]

Physics:-Psigma[1]^2

(2)

Simplify(%)

Physics:-Psigma[1]^2

(3)

Simplify(Physics:-Psigma[1]^2)

1

(4)

``


Download Simplify2.mw

I have to calculate the data in JSON format and export the result back to JSON.

It would be greate if there is any JSON package for Maple.
---

Also, I use`ExportMatrix` to export the result to CSV format.

But there are some comma (`,`) in the result content and `ExportMatrix` does not handle it well.
Is there any solution for export data to CSV file in my situation?

Thanks.

 

I am Maple 15 student edition user and the packages is not loaded when I use the execute all command from the GUI. I have to manually press the enter key to have by package loaded before I use a function defined in the package. How can I work around this issue?

Thanks

P.S: You can see the Maple document attached to this post.

NumericalSimulation.mw

Hello all of you,

I'm new here and I have a problem.

For homework I have to write a Maple package for the usage of dual quaternions. This is not a problem.

For example two functions of the package:

MyQuaternions := module()

  export Pretty, Ugly:
  local l1:
  option package:
 
  protect('i,j,k,epsilon'):
 
Pretty := proc(q::Vector)
  description "":
  return LinearAlgebra[Transpose](q)[1..4].Vector([1,i,j,k])+epsilon*(LinearAlgebra[Transpose](q)[5..8].Vector([1,i,j,k])):
end proc:

Ugly := proc(q)
  description "":
  local a;
  a := Vector(8);
  a[1]:=remove(has,remove(has,q,epsilon),{i,j,k});
  a[2]:=coeff(remove(has,q,epsilon),i,1);
  a[3]:=coeff(remove(has,q,epsilon),j,1);
  a[4]:=coeff(remove(has,q,epsilon),k,1);
  a[5]:=remove(has,coeff(q,epsilon),{i,j,k});
  a[6]:=coeff(coeff(q,epsilon),i,1);
  a[7]:=coeff(coeff(q,epsilon),j,1);
  a[8]:=coeff(coeff(q,epsilon),k,1);
  return a:
end proc:

end module:

savelib('MyQuaternions'):

 

Now I can load the module in a differnet maple worksheet "main.mw" by typing "with(MyQuaternions):"

The crucial thing now is the following: i,j,k,epsilon should be protected in "main.mw". I can do this by typing "protect('i,j,k,epsilon'):" Is there a way to tell maple to protect these variables automatically when the module is loaded? Or do I always have to type in the protect command by hand?

Thank you,

Josef

Hi all,

I created a package and saved it already. I checked and found it at D:/CaoHoc/LuanVan/Code/workspace/HINHHOC9.m but when I load it using with command, it has error.

[.............Code to create package..............]

>url := currentdir();
                   url := "D:\CaoHoc\LuanVan\Code\workspace"

>
>save HINHHOC9, cat(url, "/HINHHOC9.m");
>
>libname := libname, url;
libname := "C:\Program Files\Maple 18\lib",

    "D:\CaoHoc\LuanVan\Code\workspace\LuanVan\binaries",

    "C:\Program Files\Maple 18\lib", "D:\CaoHoc\LuanVan\Code\workspace"

>
>         with(HINHHOC9);
Error, (in with) user level initialization for package `HINHHOC9' failed: file
or directory does not exist

Please help me to identify the problem. Thanks

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