How do I view the properties of an abstract class?

Technical Source
1 min readNov 4, 2023

--

For a class such as

classdef (Abstract) AbstractClassDemo
properties (Constant)
one = 1
two = 'two'
end
end

I should be using something like

meta.abstractDetails('AbstractClassDemo')

which returns the error

No abstract methods or properties for class AbstractClassDemo or no class AbstractClassDemo.

To confirm to you that AbstractClassDemo is visible and accessible, I run

AbstractClassDemo

which returns

Abstract classes cannot be instantiated. Class ‘AbstractClassDemo’ is declared as Abstract.

What alternative options do I have? I can’t find anything else I can do. Am I doing something wrong above? Should be simple right?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Call the properties function with the name of the Abstract class as input.

>> properties AbstractClassDemo
Properties for class AbstractClassDemo:
    one
two

Alternately if you want additional information you could use either the ? operator or the meta.class.fromName function to create the meta.class object for the class. That object has an array of meta.property objects in its PropertyList property.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.