MATLAB: Can I create a bus object with elements derived from a list of names in a text file in Simulink 6.2.1 (R14SP2+)

busfileflatlistnamesobjectofsimulink

I have a text file that has a list of names that I would like to use as elements of a bus object I would like to create.

Best Answer

This enhancement has been incorporated in Simulink 7.1 (R2008a) in form of Import/Export option for Bus Editor.
For previous product releases, read below for any possible workarounds:
You can use the attached file to create a bus object that uses a list of names from a text file as its list of elements. The syntax to use this file is as follows:
MyBusObj = bus_from_text ('my_bus_names.txt');
where my_bus_names.txt is the name of the text file you wish to import from. Note that the text file should have each element on a separate line and that it assumes all elements are of type 'double.' An example text file is attached. If you wish to change this after importing the text file, you can use the buseditor GUI by typing the following command at the MATLAB Command Prompt:
buseditor
For more information on the buseditor GUI, type the following command:
doc buseditor