MATLAB 帮助中心
Specify layout grid for input parameters
setInputParametersLayoutGrid(check_obj, [row col])
setInputParametersLayoutGrid(check_obj, [row col]) sets the layout grid dimensions for displaying input parameters in the check object check_obj.
check_obj
row
col
collapse all
This example shows how to specify the layout grid for input parameters in a custom Model Advisor check.
Create a Model Advisor check object.
rec = ModelAdvisor.Check('com.mathworks.mySampleCheck'); rec.Title = 'Example: Input Parameters Layout Grid'; rec.TitleTips = 'Demonstrates setInputParametersLayoutGrid usage';
Set the layout grid to two rows and two columns.
setInputParametersLayoutGrid(rec,[2 2]);
Define input parameters.
inputParam1 = ModelAdvisor.InputParameter; inputParam1.Name = 'Enable Option'; inputParam1.Type = 'Bool'; inputParam1.Value = true; inputParam1.Description = 'Toggle to enable option'; inputParam2 = ModelAdvisor.InputParameter; inputParam2.Name = 'Threshold'; inputParam2.Type = 'String'; inputParam2.Value = '10'; inputParam2.Description = 'Set the threshold value';
Assign the input parameters to the check object.
setInputParameters(rec,{inputParam1, inputParam2});
ModelAdvisor.Check
Model Advisor check object, specified as a ModelAdvisor.Check object.
Integer
Specifies the number of rows in the layout grid for displaying input parameters in the Model Advisor.
Example: 2
2
Specifies the number of columns in the layout grid for displaying input parameters in the Model Advisor.
Introduced in R2008a
ModelAdvisor.Check | ModelAdvisor.InputParameter
ModelAdvisor.InputParameter
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处