I'm new to Mathematica, coming from a Matlab background.
I would like to know how programs in Mathematic are typically written. The documentation I have read so far deals with interactive use via a notebook.
I want to be able to write a program/procedure/function/method that I'd be able to call from another notebook -- how is this achieved? Where would I save this file? How would I call it from within Mathematica?
For example, I'd like to write a program that would take a table of multivariate data and then use the Expectation Maximisation algorithm to form a Gaussian Mixture Model (GMM) of the distribution of the data points. I know how to do this in Matlab, but how does one go about doing something like this in Mathematica?
What structured data types exist for representing the result (the parameters of the components of the GMM -- the mean vectors and covariance matrices and the mixing proportions)?
Any links would be appreciated.
Thanks in advance