9
$\begingroup$

I would like to load the package groebner50.m which is available through the website of David A. Cox. It's supposed to contain some useful tools for commutative algebra, but I haven't been able to get it working.

I tried to follow the instructions from the webpage to save the file as groebner50.m, but I was only allowed to save it with a .wl file extension. I tried running "groebner50.wl" on the Mathematica workspace, but that didn't appear to do anything either.

What I really need is a step-by-step guide for saving the package from the URL above and making the commands within it usable. Can anyone provide some guidance on how to access the functions and code in this package?

$\endgroup$

1 Answer 1

14
$\begingroup$

These are the steps I did:

  1. Go to the link you posted, RIGHT-CLICK on the link of the file groebner50.m and do SAVE-AS and save it to some folder. Say c:\tmp\groebner50.m

  2. Open Mathematica, open new notebook, then save the notebook to the same folder i.e. to c:\tmp\

  3. Now type

    SetDirectory[NotebookDirectory[]]; << groebner50.m

  4. That is all. Now type any command in the package such as ?AltBuchberger

Mathematica graphics

This package does not seem to be well documented/written. A package should always lists its commands when doing

 ?groebner50`*

But the above does not. I had to open it in text editor to find the commands it had. Just use notepad.exe or any text editor to look at the file (it is plain text file) and you'll see list of commands in it there).

And how does one load a package from a .m file using Needs

You could use either

 Get["mypkg.m"]  

or

 Needs["mypkg`","mypkg.m"]

The first argument above for needs is the context name, assumed here the same as the package file name.

From help

enter image description here

$\endgroup$
7
  • $\begingroup$ Sorry that this is frustrating, but I still can't get it to work; this is the image I have from my desktop: tinypic.com/r/rhlppz/8 $\endgroup$
    – daOnlyBG
    Nov 3, 2014 at 7:20
  • 1
    $\begingroup$ @daOnlyBG The image you show above !Mathematica graphics indicates you hit "=" before. Do not use the "=" to type the commands. This will send the commands to the Wolfram alpha server on the Wolfram Cloud. Just type SetDirectory[NotebookDirectory[]]; as is without hitting "=" before it. Make sure again you have saved the notebook to the same folder as the package. Do not use the Wolfram Cloud functionality. $\endgroup$
    – Nasser
    Nov 3, 2014 at 7:30
  • $\begingroup$ May I converse with you in chat? $\endgroup$
    – daOnlyBG
    Nov 3, 2014 at 7:45
  • 2
    $\begingroup$ Seriously @daOnlyBG, I hope you have not been working with Mathematica through the = command all the time, have you? $\endgroup$ Nov 3, 2014 at 12:16
  • $\begingroup$ @SjoerdC.deVries, yes, I have. Again, I am a beginner with this software. Nasser was kind enough to point me in the right direction- thanks again, Nasser! $\endgroup$
    – daOnlyBG
    Nov 4, 2014 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.