How to define an object witch has parameters and functions?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
How to define an object witch has parameters and functions?
1 Commento
per isakson
il 31 Ott 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
Risposte (0)
Vedere anche
Categorie
Scopri di più su Software Development Tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!