OOP - Sealed Superclasses
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Peter Cook
el 30 de En. de 2018
Respondida: Tibor Auer
el 29 de Jun. de 2021
I am trying to create a custom class to overload the MATLAB image object but am getting this error message:
Class 'matlab.graphics.primitive.Image' is Sealed and may not be used as a superclass
Is there a list of [graphics] objects in The MathWorks documentation which are not "sealed?"
Or should I start from the beginning with
classdef overloadedImage < handle
0 comentarios
Respuesta aceptada
Steven Lord
el 30 de En. de 2018
"Is there a list of [graphics] objects in The MathWorks documentation which are not "sealed?" "
No, there is no such list.
"I am trying to create a custom class to overload the MATLAB image object "
Can you say a little more about why you're trying to overload the image object? Perhaps you can already do what you want and you're just not aware of how to do it, or perhaps this could be worthy of an enhancement request?
4 comentarios
Steven Lord
el 29 de Jun. de 2021
Since this question was asked, we added the capability to create your own chart classes. It may not meet all your needs, but take a look at this section of the documentation for more information.
Más respuestas (2)
Tibor Auer
el 28 de Jun. de 2021
I have a similar issue with graph class, which is also Sealed. I would like to extend its funcionality by adding further methods and proprties.
4 comentarios
Tibor Auer
el 29 de Jun. de 2021
The main extension is to add methods to calulate the line of the graph and some further methods supporting the calculation.
I have also added some customised plotting as a method, which also adapts to when the graph is a line of a graph.
Tibor Auer
el 29 de Jun. de 2021
@Peter Cook, There might be some misunderstanding. "Line of graph" is not about plotting but transforming: Line graph - Wikipedia
0 comentarios
Ver también
Categorías
Más información sobre Construct and Work with Object Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!