1

I have a full functional MATLAB program, and I need to make a Python script where I can call a specific function from the MATLAB program. I am using Python version 2.7, and I did try to install pymat, but it didn't work for some reason.

I did look into other questions where all recommend pymat, but it is old and not maintained.

Peter Mortensen
31.3k22 gold badges110 silver badges134 bronze badges
asked Oct 13, 2011 at 20:54
0

4 Answers 4

3

I have no personal experience with it, but the project page for mlabwrap seems to indicate it will fit your needs.

From the project page:

Mlabwrap is a high-level python to MATLAB® bridge that lets MATLAB look like a normal Python library.

Peter Mortensen
31.3k22 gold badges110 silver badges134 bronze badges
answered Oct 13, 2011 at 21:11
Sign up to request clarification or add additional context in comments.

Comments

1

You can use SAGE which is a Python-based system, and it has an interface to MATLAB.

Peter Mortensen
31.3k22 gold badges110 silver badges134 bronze badges
answered Oct 13, 2011 at 21:13

Comments

0

You might want to use pymatbridge. It's a library that allows you to send variables (for example, NumPy ndarray class instances) between MATLAB and Python. It also has an implementation of a MATLAB 'magic' function for IPython.

Peter Mortensen
31.3k22 gold badges110 silver badges134 bronze badges
answered May 16, 2014 at 3:06

Comments

0

I guess the MATLAB officially provided matlab.engine could be the one you want. Refer to "Call User Script and Function from Python" and other instructions on the official website. It runs well for most cases on my ubuntu16.04 with python3.5.2(jupyter-notebook) + MATLAB R2016b.

answered Dec 19, 2017 at 2:21

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.