A method of a class must accept an instance of the class as one of its inputs, unless it's a Static method. A class function, defined after the classdef block but in the same file, can accept an instance of the class but more commonly accepts just some data.
If a function needs to call a method on an instance of the class, the function probably should be a public method (if you need/want it to be accessible by code outside the class definition), a private method (if it doesn't need to be accessible by code outside the class definition), or a class function that accepts an instance of the object.
So let's look at the functions associated with your class.
function [Result] = r (myobj)
Result = recurseComputeR(myobj.Value);
end
Accepts an instance of the class, intended to be called by users of your class. Currently defined as a method, which I feel is correct.
function [eindruck] = s (myobj)
eindruck = ComputeS(myobj.Value);
end
Ditto what I said for your r method.
function [deltaf] = x (myobj)
deltaf = ComputeDeltaF(myobj.Value);
end
Ditto what I said for r and s.
function deltaf = ComputeDeltaF(myobj)
deltaf = 0.0001 * (1000000000*s(myobj)+500000000*r(myobj));
end
Currently defined as a class function. This calls methods on the class itself (s and r). I would make this either a private method or a class function into which you pass the object, not just one of the object's properties. Search the documentation for "class attributes" to learn how to make this into a private method if that's the approach you choose.
function eindruck = ComputeS(myobjValue)
eindruck = myobjValue*0.000001;
end
Currently defined as a class function. This only needs the value of one of the object's properties, so it seems appropriate as a class function.
function Result = recurseComputeR(myobjValue)
if myobjValue > 0
Result = recurseComputeR(myobjValue-1)*1000+2/1000000000000;
else
Result = 2/1000000000000;
end
end
Currently defined as a class function. Doesn't need to use the object, just one of its property values that is passed into it by its caller. Appropriate as a class function.