I have two classes, whereas the second class is to be called by the first one.
classdef sender < handle
properties
Bitvektor;
end
properties (Access = private)
kobj;
end
methods
function obj = sender(variable)
obj.Bitvektor = variable;
obj.kobj = kanal;
end
function u = sendeBitvektor(obj)
obj.kobj.Bitvektor = obj.Bitvektor;
u = obj.kobj.sendtoreceiver;
end
end
end
classdef kanal < handle
properties
Bitvektor
Delta
end
methods
function on = kanal(obj)
on.Bitvektor ;
on.Delta
end
end
methods
function u = sendtoreceiver(on)
on.Delta
end
end
end
Now if i try to change delta in kanal the value seems to be changed.
delta = 0.05;
kanal.Delta = delta
However, if i call the function sendtoreceiver, it appears, that the value wasn't assigned to delta.
Sender is not supposed to know delta.
How do i permanently change the value of delta, such that if i call the function sendtoreceiver delta is already assigned ?
Thanks for every help