using a table in a "from workspace block" in simulink
31 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
for my Thesis I developed a control in simulink to control my heating elements.
for the control and the parameters I need for the regulation of the whole system, I want a table which appears when I double click on the §from workspace"-block. the table should contain 6 columns(Port-Number,ID, P(stationary), P(transient), Ohm, Voltage) and 12 rows.
Each row is for one PWM-Port of my Arduino.
The configurated table should be saved as an .xlsx, so if I have to measure again with the same parameters I just can use the block "from spreadsheet" for the control
I already developed a table for my needs itself, but how can I include this table into the block or how can I get this done in general?
I hope you understand what I'm asking ^^ and can help me with my problem
thank you for your support :)
0 个评论
回答(1 个)
Nick Choi
2017-12-8
编辑:Nick Choi
2017-12-8
If the data is loaded into MATLAB as a table, you could import the signal data using a 'From Workspace' block on the column or row data points. As described in the following documentation link, a MATLAB table is not a supported input format and you would need to have the data as a matrix or a timeseries in order to properly use the block:
If you are trying to access data from an Excel spreadsheet and you want to make use of the row/column names, a 'From Spreadsheet' block would be more suitable for this application. If you click on the icon next to the 'Sheet Name' dialog parameter of the block, you can view the contents of the raw Excel file to specify the range of data that you want to use:
Double-clicking on the 'From Spreadsheet' block to visualize its content is not a feature of the block. You could look into masking the block or adding model callback functions if you wanted to try adding additional functionality.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!