MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to make m_file ?

  • To: mathgroup at
  • Subject: [mg15362] Re: [mg15335] How to make m_file ?
  • From: "wgrebe" <wgrebe at>
  • Date: Sat, 9 Jan 1999 23:58:21 -0500
  • Sender: owner-wri-mathgroup at

>I am using mathematica 2.2 version.
>I'd like to know how to make ***.m file in order to use it as a
>subroutine file.
>Currently, I save a mathematica program in text_file with ***.m and
>recall it in another main program as a subroutine.  If there is another
>way or better way to make a ***.m file,  Please let me know.

Hi Chongdae,
I'm not shure, what you mean. I'm working with Mathematica 3.0. When I
write a Mathematica-Package (*.m), framed by BeginPackage[] and
EndPackage[], I convert the cells that contain the executable parts of
the package (in general I have just one)
to Initialization cells by selecting them and choosing:
   Cell | Cell Properties | Initialization Cell. Then I save them by
File | Save as special | Package Format. The Package can simply be
called at any point of any other Package or from somewhere else by:
<< *.m (load and evaluate)
Of course first you have to set the correct Directory.


  • Prev by Date: listplot and notebook directory
  • Next by Date: FW: Resend: power spectrum/freqs.
  • Previous by thread: How to make m_file ?
  • Next by thread: How to save a file in package (*.m) format