How to define an object witch has parameters and functions?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How to define an object witch has parameters and functions?
1 Kommentar
per isakson
am 31 Okt. 2018
Here is the definition of BasicClass:
classdef BasicClass
properties
Value
end
methods
function r = roundOff(obj)
r = round([obj.Value],2);
end
function r = multiplyBy(obj,n)
r = [obj.Value] * n;
end
end
end
Antworten (0)
Siehe auch
Kategorien
Mehr zu Software Development Tools finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!