Philip
unread,May 14, 2011, 11:30:34 PM5/14/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to freema...@googlegroups.com
Hi,
The function "figure" is one of many FreeMat built-ins that has a namesake with slightly different expectations in Matlab. Many of my Matlab scripts open plotting windows using lines like
figure('Name','Density Plot');
This breaks in FreeMat, where figure takes a single numeric argument. But in truth I barely care about my figure's name, so I would be quite content if FreeMat's figure would simply ignore my unfamiliar input arguments and pretend I had said just 'figure;'. This would take a little work to arrange, but not much: one would just change the function header in figure to receive input arguments through varargin, handle the first input argument if it happens to be a number, and ignore all input arguments if it is not.
There are other opportunities for this kind of improvement. Whenever a user supplies a handle-graphics property that FreeMat does not recognize (maybe because it's a Matlab-only thing, or maybe because it's an error), I would suggest either silently ignoring it or printing a warning and trying to proceed anyway. This way of thinking could make a lot more native Matlab scripts run to completion with warnings instead of stopping early with errors under FreeMat. It would be interesting to hear whether the community thinks this idea is worth pursuing.
Respectfully, Philip