Question about calling class

13 visualizaciones (últimos 30 días)
Lawren Lin
Lawren Lin el 23 de Abr. de 2017
I was looking an class example code, and I got some problem with it.
1. What does it happen when I do:
classdef ClassA
methods
function obj = ClassA(input)
function set_obj(obj)
function [x y z] = unpack(obj)
end
end
If I call ClassA in another file:
Center = ClassA
What will return while I do this action? In the code, I didn't return anything in ClassA.
2. What does function [x y z] mean? Does it return the 1*3 matrix while calling ClassA?
3. Does all the function in ClassA run automatically? I mean function 'obj', 'set_obj', '[x y z]' start running when I call ClassA
I am not used to use class application, thanks for help!

Respuestas (0)

Categorías

Más información sobre Class Introspection and Metadata en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by