Tüm parametreleri ParameterStruct
üzerinde ayarlamaya rağmen, her mod için uygun parametre yapısını yükleyin.
Bu tür haritalar Bağımlı özellikli bir sınıfa iyi bir şekilde bağlıdır, çünkü yalnızca birkaç girdiden oluşturulan çok sayıda model parametresi vardır. Bir class
görünürlük bir struct
oluşturmaya çalıştığınızda
Ama saygı değildir: Ben sonradan C'ye yapı ihraç etmek gerekir çünkü
classdef SquareArea
properties
Width
Height
end
properties (Access =private)
Hidden
end
properties (Dependent)
Area
end
methods
function a = get.Area(obj)
a = obj.Width * obj.Height;
end
end
end
>> x=SquareArea x = SquareArea with properties: Width: [] Height: [] Area: [] >> struct(x) Warning: Calling STRUCT on an object prevents the object from hiding its implementation details and should thus be avoided. Use DISP or DISPLAY to see the visible public details of an object. See 'help struct' for more information. ans = Width: [] Height: [] Hidden: [] Area: []
Bu, kabul edilemez modu, oluşturulan koddan dinamik olarak ayarlayabilmek için.