isprop and ismethod for User Class

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

isprop and ismethod for User Class

Lau2019
Hello,

I tried to used "isprop" and "ismethod" for an user defined class, but they
didn't work.

Example:
%-------------------------------------------------------
% Class file
classdef myclass
    properties
        ID
    end
    methods
        function obj = myclass()
        end
        function  Add(obj, ID)
        end
    end
end

%-------------------------------------------------------
% main program
c = myclass()
isprop(c, 'ID')
ismethod(c, 'Add')

%-------------------------------------------------------
% Command window
c =



ans = 0
ans = 0

%-------------------------------------------------------

The answer is always false. But this code works in Matlab, that returns
true.

Do you know if the current implementation of "isprop" and "ismethod" can
only work with graphics objects ?

Thanks in advance

Lau2019







--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html