Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
08 Jul 2009 Clean up context of anonymous function handles - bug #328733 This submission provides a workaround for MATLAB bug #328733. Author: Volkmar Glauche Glauche, Volkmar

This should actually work in older releases, too. My focus was on the eval() solution because the idea came from http://www.mathworks.com/matlabcentral/fileexchange/24447, where I generate code for arbitrary variables. This code of course needs to be evaluated.

07 Jul 2009 Generate .m-file code for any MATLAB variable Generate .m script code for any MATLAB variable. If run, the code recreates the input variable. Author: Volkmar Glauche Glauche, Volkmar

I decided not to have this compact mode because lines may get really long. But I will think about it again.

26 Jun 2009 Clone Handle Object - using MATLAB OOP How to clone an object (deep copy) which inherits reference behaviour from the 'handle' class. Author: Bobby Nedelkovski Glauche, Volkmar

25 Jun 2009 Clone Handle Object - using MATLAB OOP How to clone an object (deep copy) which inherits reference behaviour from the 'handle' class. Author: Bobby Nedelkovski Glauche, Volkmar

This is the code I used for copyobj:
        function new = copyobj(obj)
            % This method acts as a copy constructor for all derived
            % classes.
            new = feval(class(obj)); % create new object of correct subclass.
            mobj = metaclass(obj);
            % Only copy properties which are
            % * not dependent or dependent and have a SetMethod
            % * not constant
            % * not abstract
            % * defined in this class or have public SetAccess - not
            % sure whether this restriction is necessary
            sel = find(cellfun(@(cProp)(~cProp.Constant && ...
                ~cProp.Abstract && ...
                (~cProp.Dependent || ...
                (cProp.Dependent && ...
                ~isempty(cProp.SetMethod))),mobj.Properties));
            for k = sel(:)'
                new.(mobj.Properties{k}.Name) = obj.(mobj.Properties{k}.Name);
            end
end

25 Jun 2009 Clone Handle Object - using MATLAB OOP How to clone an object (deep copy) which inherits reference behaviour from the 'handle' class. Author: Bobby Nedelkovski Glauche, Volkmar

I also faced this problem, but for more complicated objects (using e.g. protected and dependent properties). It turned out that just looping over all properties did not do the trick. I had to check all kind of meta-properties to make sure the copyobj method didn't crash.

23 Jun 2009 Submit MATLAB functions to a cluster Run MATLAB functions on a gridengine/torque/PBS cluster Author: Volkmar Glauche Glauche, Volkmar

Hi Jveer,
the MATLAB code should work on mac osx. However, you will need to modify qsub_submit_cm.m and qsub_check_finish.m. You will have to replace the qsub and qstat calls with their xgrid equivalents.
In qsub_submit_cm, you will have to replace the qsub command line call with the appropriate call to "xgrid ... -job submit ...", and in qsub_check_finish.m you would replace the qstat calls with "xgrid ... -job status ..." or something like this.
I do not have any experience with mac osx or xgrid, but it should be fairly straightforward to adapt these calls. If you have any questions, feel free to ask. If you get this code to run, it would be nice to let me know about the appropriate xgrid commands.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com