In [1]:
import pymatbridge as pymat

In [2]:
ip = get_ipython()
pymat.load_ipython_extension(ip)


Starting MATLAB on ZMQ socket ipc:///tmp/pymatbridge-13a5236e-5f5a-4b58-a712-84cca5314f75
Send 'exit' command to kill the server
..............MATLAB started and connected!

In [3]:
%%matlab --size 400,350
t = linspace(0,6*pi,100);
plot(sin(t))
grid on
hold on
plot(cos(t), 'r')



In [4]:
%matlab b = 10*cos(t)+30; plot(b); grid on



In [5]:
a = [1,2,3]

In [6]:
%%matlab -i a -o b
b = a + 3;

In [7]:
print(b)


[[ 4.  5.  6.]]

In [ ]: