In [1]:
import pymatbridge as pymat

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


Starting MATLAB on ZMQ socket ipc:///tmp/pymatbridge
Send 'exit' command to kill the server
.......MATLAB started and connected!

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



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



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

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

In [12]:
print(b)


[4, 5, 6]

In [ ]: