Inheritence scope problem with superclass timeseries

Hi, I have a subclass inherited from timeseries who is named "Interpolable". I would like to extends the classname timeseries to add some properties and methods to it. In my "Interpolable" constructor (with no parameters), I instanciated the constructor of the superclass with no properties too: obj = obj@timeseries(). In a sub methods named: function initializeX(obj, Data, Time), the superclass are initiated with a vector of data and time like that: "obj.Data = Data" and "obj.Time = Time". The problem is that the initializeX returns me a new timeseries and don't memorize the new data within the object. What should I do?

1 comentario

Stephane
Stephane el 28 de Oct. de 2013
Editada: Stephane el 28 de Oct. de 2013
classdef Interpolable < timeseries
methods
function obj = Interpolable()
obj = obj@timeseries();
end
function initx(obj,Data, Time)
obj.Data = Data;
obj.Time = Time;
end
end
end

Iniciar sesión para comentar.

Categorías

Productos

Preguntada:

el 28 de Oct. de 2013

Respondida:

el 7 de Dic. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by