I created a heterogeneous object array in Matlab derived from the matlab.mixin.Heterogeneous class. My array now contains objects of the superclass Cells and subclasses like Neuron, Astrocyte etc.
The methods I want to assign to my subclasses are supposed to simulate their behavior depending on different stimuli. In order to calculate the behavior, I need the objects to perform mathematical operations. But when I define a function that uses operators in the methods of the class, Matlab tells me e.g.:
Undefined operator '-' for input arguments of type 'Cells'.
Then I tried to construct my superclass with multiple inheritances ( Cells < matlab.mixin.Heterogeneous & double ), but then this error appears:
Error using Cells: Class 'Cells' cannot be a subclass of matlab.mixin.Heterogeneous and also inherit a 'subsasgn' method from class 'double'.
which is not surprising, as it says in the description of 'matlab.mixin.Heterogeneous'
You cannot override the following methods in your subclasses:
...
subsasgn
As my only other idea would be to define the methods as functions outside the classes, I wanted to ask if there was any possibility to perform mathematical operations in heterogeneous object arrays.
minuswill define-- Suever