package for Mathematica-1

mayflowers posted @ 2010年11月24日 10:02 in mathematica with tags Mathematica package , 1623 阅读

To use a Package, we should load it either Get(<<) or Needs

  • Get["package`"] or <<package`: Read the package file and evaluate each expression
     and definition. If a package filename is Filename.m and located in a path Filepath,

       <<Filepath`Filename`


  • Needs["package`"] : Read the file only if it has not been read already.

 

To list the functions defined in the package, we can use Names or ?

  • Names["package`*"]: list the the names of the functions.
  • ?package`*: list the hyperlinks of the functions

 

To get the message of a function, use

   ?function

 

To avoid the collision of a function definitions, use 

   Remove[function]

   to remove the function in Global` context. Note that Clear[exp] is not enough.

To be convenience to load the packages often used, use

   DeclarePackage["newpackage`",{"package1`","package2`",...}],

  and save as mypackages.m. Then load the file as

  • <<mypackages.m as your first input when you start a new session.
  • put mypackage.m in one of the init.m files and Mathematica will automatically load it whenever you start a session.
Maharashtra HSC Mode 说:
2022年8月24日 13:26

Maharashtra HSC Model Question Papers 2023 Download, The state board of Mah state which is Maharashtra State Board of Secondary & Higher Secondary Education situated in Pune. Maharashtra, Maharashtra HSC Model Question Papers 2023 a state spanning west-central India is best known for its fast-paced capital, Mumbai formerly Bombay as per the Wiki. Higher Secondary Certificate which is referred as HSC is the certificate issued to the candidates qualified the 10+2 examinations.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter