<commit_before># Python-MATLAB(R) Bridge and ipython matlab_magic

A python interface to call out to [Matlab(R)](http://mathworks.com). Original
implementation by [<NAME>](http://www.maxjaderberg.com/).

This implementation also includes an [ipython](http://ipython.org) matlab_magic
extension, which provides a much simplified interface for weaving python and
Matlab code together.  


***AT PRESENT THIS MAY NOT WORK ON WINDOWS; BETA TESTERS WANTED ***

## Usage

For examples, check out the `.ipynb` files

## Installation

To install from the source-code. Download the [code zip
file](https://github.com/arokem/python-matlab-bridge/archive/master.zip). Unzip
it somewhere on your machine and then issue:

    python setup.py install

This should make the python-matlab-bridge import-able.

### API: 

Initialize the Matlab class:

    from pymatbridge import Matlab
    mlab = Matlab()

By default the matlab executable is whatever gets called when you type `matlab`
in your terminal, the host is localhost and the port is a random unused port.

You can specify these in the following manner: 

    mlab = Matlab(matlab='/Applications/MATLAB_R2011a.app/bin/matlab',
                    host='192.168.0.1', port=5151)

Alternatively, if `matlab` is not recognized in the command-line, you can
create a [symlink](http://en.wikipedia.org/wiki/Symbolic_link) to it's
location. For example:

	  ln -s /Applications/MATLAB_R2012b.app/bin/matlab ~/bin/matlab
<commit_msg>Updated readme with information about the cheese shop install.<commit_after># Python-MATLAB(R) Bridge and ipython matlab_magic

A python interface to call out to [Matlab(R)](http://mathworks.com). Original
implementation by [<NAME>](http://www.maxjaderberg.com/).

This implementation also includes an [ipython](http://ipython.org) matlab_magic
extension, which provides a much simplified interface for weaving python and
Matlab code together.  


***AT PRESENT THIS MAY NOT WORK ON WINDOWS; BETA TESTERS WANTED ***

## Usage

For examples, check out the `.ipynb` files

## Installation

To install from the source-code. Download the [code zip
file](https://github.com/arokem/python-matlab-bridge/archive/master.zip). Unzip
it somewhere on your machine and then issue:

    python setup.py install

This should make the python-matlab-bridge import-able.

Alternatively, you can get pymatbridge at the
[cheese-shop](https://pypi.python.org/pypi/pymatbridge).

This means that you can use:

    easy_install pymatbridge

Or

    pip install pymatbridge

To get things going.


### API: 

Initialize the Matlab class:

    from pymatbridge import Matlab
    mlab = Matlab()

By default the matlab executable is whatever gets called when you type `matlab`
in your terminal, the host is localhost and the port is a random unused port.

You can specify these in the following manner: 

    mlab = Matlab(matlab='/Applications/MATLAB_R2011a.app/bin/matlab',
                    host='192.168.0.1', port=5151)

Alternatively, if `matlab` is not recognized in the command-line, you can
create a [symlink](http://en.wikipedia.org/wiki/Symbolic_link) to it's
location. For example:

	  ln -s /Applications/MATLAB_R2012b.app/bin/matlab ~/bin/matlab

{'fraction_non_alphanumeric': 0.09329173166926677, 'fraction_numerical': 0.0124804992199688, 'mean_word_length': 4.072784810126582, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7601068', 'n_tokens_mistral': 1046, 'n_tokens_neox': 958, 'n_words': 354}