How to use objects of one class in the methods of another class as input?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
kanuri venkata mohana
le 28 Juil 2020
Commenté : Matt J
le 28 Juil 2020
Hi,
How can I use object of one class in another class?
Example
classdef clcore
properties
dcs
wcs
end
methods
function objc = clcore (dcs, wcs)
objc.dcs = dcs;
objc.wcs = wcs
end
end
end
the object of clcore is objc
objc = clcore
Now the same object i want to use it in my clMec
classdef clMec
properties
mecmode
mec
end
end
I want to give objc as input to clmec since i have many calculations using the parameters in objcore. So there is anyway in doing it.
Thank you
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Methods dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!