How to check if a class has a specific base class in Matlab

Viewed 639

I define in Matlab a class that's a subclass of another one, like this:

classdef SpecificLimit < BaseLimit

  % Private properties section
  properties (SetAccess = private, GetAccess = private)
    options;
  end

  % Public section
  methods (Access = public)
    % ...
  end
end

Now I've a variable named r and I want to check if this variable is a class instance that has BaseLimit as base class (I've a lot of them). Is there an easy way to do that? I've read about meta.class but I didn't find a way to perform this check.

I'm using Matlab r2014a.

2 Answers
Related