Explanation

Classes in MATLAB fall broadly into two categories—handle classes and value classes. While there are some similarities, there are also significant usage differences for these classes. Code Analyzer cannot always determine with certainty whether a class is a handle class or a value class, because it may inherit this property from its superclass.

Code Analyzer produces this message because it has seen some usage patterns characteristic of a value class, and other usage patterns characteristic of a handle class—an apparent conflict. Two other messages always accompany this message, giving additional information about the behaviors Code Analyzer has seen suggesting this conflict.


Suggested Action

The evidence strongly supports a usage conflict. Examine the messages that accompany this one and fix the usage that does not correspond to your intended class behavior. If the class is derived from a superclass that is a handle class, you can indicate this property directly in the class definition by including the handle explicitly as a superclass, as shown in the following example:

classdef myclass < superclass & handle

This makes it clear to Code Analyzer (and others reading the class) that it is a handle class. This could be enough to suppress inappropriate messages.