Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'MatLab X11 plots are interactive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
MatLab X11 plots are interactive
Authored by: googoo on Apr 04, '05 02:29:17PM

This is OK if the plot that you are generating is your final product, but you give up the interactive behavior of the MatLab X11 GUI plot interface, where you can change plot parameters by clicking on them. Furthermore, you can save plots to many formats, including PDF, from the X11 interface. Another file format available in MatLab is the MatLab figure file (.fig), which allows you to open a saved plot and reconfigure plot ranges, axis labels, etc. and even export to other file formats without regenerating the plot from your original data.

-Mark



[ Reply to This | # ]
MatLab X11 plots are interactive
Authored by: ennisdb on Apr 04, '05 03:18:52PM

I agree this is only relatively useful, but it points towards the ability to better interface Matlab and OS X. These things can be wrapped into an m-file to increase the usability. I previously wrote the following function to help me compare two m-files. I thought others might find it useful.


% This function sends an external call to FileMerge to compare two files a lá
% xdiff. If which(fname#) is empty (eg Matlab can't find it), then the fname#
% is assumed to be a full pathname (relative or absolute).
%
% SYNTAX: xdiff(fname1,fname2) OR xdiff fname1 fname2
%
% Place the following script in ~/bin and make it executable.
%
% #!/bin/sh
% /Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge -left $1 -right $2
%
% DBE 02/21/04
function xdiff(fname1,fname2);
tmp1=which(fname1);
if ~isempty(tmp1), fname1=tmp1; end % Assume the fname is a complete absolute or relative path if WHICH can't find it
tmp2=which(fname2);
if ~isempty(tmp2), fname2=tmp2; end % Assume the fname is a complete absolute or relative path if WHICH can't find it

cmmnd=['~/bin/xdiff ',fname1,' ',fname2,' &'];
unix(cmmnd);
return



[ Reply to This | # ]
MatLab X11 plots are interactive
Authored by: gustou on Apr 05, '05 08:04:23AM

What about a :
FileMergeApp = '/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge'

cmmd = sprintf('%s -left %s -right %s &', FileMergeApp, fname1, fname2);
unix(cmmnd);

This solution is a purely Matlab solution no ?



[ Reply to This | # ]