Home Download Buy Blog Forum Support

How to Display Matlab Plots

How to Display Matlab Plots

Postby 9jack9 on Mon Aug 13, 2012 6:05 am

I hope this is the appropriate place for a question like this. Anyway, I've just installed SublimeText 2, and I configured it so that it can build matlab code with this code in the custom build system file:

Code: Select all
{
    "cmd": ["/Applications/MatLab.app/bin/matlab", "-nosplash", "<$file_name"],
    "selector": "source.m"
}


It should be noted that first, I had to add matlab to my math by

Code: Select all
PATH=$PATH\:/Applications/MatLab.app/bin


And then I had to run one time

Code: Select all
sudo matlab


So at this point, I can have my matlab code compile through Sublime Text 2, but it won't show any generated figures/plots or things of that nature. I wash oping that someone here could point out any suggestions in this regard.

Any help is greatly appreciated :)
9jack9
 
Posts: 1
Joined: Mon Aug 13, 2012 5:58 am

Re: How to Display Matlab Plots

Postby lustiz on Sat Dec 15, 2012 2:59 pm

I just had a similar problem where I wanted to insert pause commands after imshow(). I found following Matlab.sublime-build settings to be the best solution so far:

Code: Select all
{
    "cmd": ["xterm", "-e", "matlab", "-nosplash", "-nodesktop", "-r", "run $file_name; quit;"],
    "selector": "source.m"
}


This requires xterm to be installed on your linux distribution and I guess it should be quite similar on OSX. It will start xterm and run the Matlab file over there while behaving like the Matlab Desktop.

Cheers
lustiz
lustiz
 
Posts: 2
Joined: Sat Dec 15, 2012 2:19 pm

Re: How to Display Matlab Plots

Postby holland on Mon Aug 19, 2013 8:07 am

I can't seem to get this to work using Sublime Text 2, Mac OSX, and Matlab R2013a. What exactly is the xterm function that I may be missing?
holland
 
Posts: 1
Joined: Mon Aug 19, 2013 8:03 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], rzea and 45 guests