Hi guys,
I would like to pass my propert values of super class to subclass? I could transfer the properties but not the values of it. I am sending you the code that i made. Please tell me how could i correct it.
classdef clWinding properties Npcs Npcp end properties (Dependent) kb end methods function objW = clWinding (Npcs, Npcp) objW.Npcs = Npcs; objW.Npcp = Npcp; end function kb = get.kb (objW) kb = objW.Npcs + objW.Npcp; end endend
This is the superclass
classdef clLitz <clWinding properties Litz end methods function objLitz = clLitz (Npcs, Npcp, Litz) objLitz @ clWindingPrimary (Npcs, Npcp); objLitz.Litz = Litz; end endend
When i did this i could pass the fields but not values of it. Can anyone tell me what mistake i have done and help me to resolve it.
Thnak you
Best Answer