MATLAB Answers


shadowing static class method

Asked by Pieter van den Berg on 19 Sep 2013

Is it possible to shadow a static class method of a builtin class? E.g. suppose that there is a class

in .../MATLAB/.../toolbox/.../@foo/foo.m

classdef foo
methods(Hidden = true, Static = true, Access = 'public')
   function obj = loadobj(x)

can I shadow the loadobj method somehow? I tried creating a file @foo/foo.m in my path with only the static method in it but that doesn't seem to work.




Remark on nomenclature: foo in your example is not a builtin class. Doc says

    A built-in function is part of the *MATLAB executable*. MATLAB does not 
    implement these functions in the MATLAB language. Although most built-in 
    functions have a .m file associated with them, this file only supplies 
    documentation for the function.

Nevertheless, your question is easily understood. AFAIK: the answer is no.

Ok, thanks! I think you are right.

Log in to comment.



0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!