|
|
|
| R2012a Documentation → Simulink Verification and Validation | |
Learn more about Simulink Verification and Validation |
|
| Contents | Index |
Add row to table
addRow(ft_obj, {item1, item2,
..., itemn})
addRow(ft_obj, {item1, item2, ..., itemn}) is an optional method that adds a row to the end of a table in the result. ft_obj is a handle to the template object previously created. {item1, item2, ..., itemn} is a cell array of strings and objects to add to the table. The order of the items in the array determines which column the item is in. If you do not add data to the table, the Model Advisor does not display the table in the result.
Find all of the blocks in the model and create a table of the blocks:
% Create FormatTemplate object, specify table format ft = ModelAdvisor.FormatTemplate('TableTemplate'); % Add information to the table setTableTitle(ft, {'Blocks in Model'}); setColTitles(ft, {'Index', 'Block Name'}); % Find all the blocks in the system and add them to a table. allBlocks = find_system(system); for inx = 2 : length(allBlocks) % Add information to the table addRow(ft, {inx-1,allBlocks(inx)}); end

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |