Last modified 10 months ago Last modified on 2019-04-25 09:42:23

Matlab setup procedure for WHSC sed trans group using SVN at ""

Step 1. Get all the toolkits from the "m_cmg" and "m_contrib" repositories at It requires about 27 GB of storage if you get it all:

  • Windows:
    1. Install TortoiseSVN, then bring up the Windows File Explorer.
    2. Make a new directory called "m_cmg" where you keep your matlab toolkits (mine are in c:/rps, so I made c:/rps/m_cmg).
    3. Make a subdirectory called "trunk" which will contain the main branch of the development tree
    4. Right click on this "trunk" directory (c:/rps/m_cmg/trunk on my system) and if TortoiseSVN installed correctly, you should see an "SVN Checkout" option.
    5. Click on "SVN Checkout" and then type in "" as the URL for the repository.
    6. This should download the latest version of the m_cmg toolboxes to your system! It will take a while so get a beverage.
    7. Repeat steps 2-6 to checkout the other repository "".
  • Linux:
    1. Use your SVN command line client to checkout m_cmg/trunk and m_contrib/trunk:
      svn co /home/rps/m_cmg/trunk
      svn co /home/rps/m_contrib/trunk 
    2. If you have problems with the command line SVN (e.g. it's not installed on your Linux system or it is not working correctly), try using the SmartSVN Java SVN client. The free version is sufficient.
    3. If using KDESVN (default in Ubuntu), you specify as below:
      svn co /home/rps/m_cmg/
      svn co /home/rps/m_contrib/

No final directory name in the destination- otherwise, you get paths like /home/rps/m_cmg/m_cmg (which you don't really want).

If you don't have an account, you can still get the programs by substituting "svn_public for "svn" in the paths above.

Step 2. Set up Matlab to use the stuff you just downloaded.

  • Set up the Matlab path: Copy the file "m_cmg/trunk/startup_template.m" into your "Documents\Matlab" directory and rename it startup.m. (for unix try "/usr/local/Matlab*/toolbox/local" if the other location doesn't work).
  • Edit this file to point to the proper m_contrib/trunk and m_cmg/trunk directories on your machine. When Matlab starts, it will automatically run "startup.m", which will then add these directories to your path, so you don't have to mess around with adding to your path via the GUI. Actually it's safer to remove all the local toolbox stuff you added via the GUI and add it to the startup.m file instead. That way you have one place to look to see what's set.
  • after executing startup, check your Matlab path by typing "path" and make sure it looks ok (without multiple versions of the same toolkit, for example). You may want to remove certain directories via Matlab's "File=>Set Path" GUI that are now being set via startup.m.
  • You now should be good to go!
    • Warning: there may be issues with getting a program stored in multiple locales from the wrong source, but we've found having more on the path works better. Using "which" will let you examine where it's getting the function from. Some processing streams can be very small and work, but often the programs use functions from a bunch of places, so it's easiest to just start with everything.

Marinna's startup notes: Marinna's_Matlab_startup