method syntax for handle objects
Afficher commentaires plus anciens
For handle class methods, would there be any performance difference between the two implementation below?
function initializeMesh(obj,tempVertices,tempFaces)
end
function obj = initializeMesh(obj,tempVertices,tempFaces)
end
I know the lower of the two is a little more flexible syntatically in that both:
meshInstance.initializeMesh(tempVertices,tempFaces)
and
meshInstance = meshInstance.initializeMesh(tempVertices,tempFaces)
are allowed and seem to produce the same result. I'm leaning towards include the obj return for that reason. Is there anything I'm missing here that might make the returnless method better?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!