Simulink filtering of a table
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a table with 5 col of input states and one as output.
So for 0.6 & 0.4 & 0.5 & 310 & 100 as input I would like to output 0.0453 (row 1).
So my question is how do I perform such a task in Simulink, as the inputs are signals in a Simulink Model?
Have a nice day!
2 个评论
Nishant Gupta
2020-5-28
You can use 'Matlab Function' block to do this. Just write the relationship between inputs and outputs inside the block, then you will get the resultant output corresponding to input signals.
Refer to the following link to know how to implement MATLAB function using block:
回答(2 个)
Fangjun Jiang
2020-5-28
The straightforward way to do this is to use "n-D Lookup Table". You have a 5-D lookup table here. The first 5 columns are the loopup axis, the sixth column is the output data.
Notice the firtst 4 columns of data you show here didn't change value? I imagine the large (45000x6) array is the expanded view of the loopup table data. Take a look at the help and example model of the Simulink n-D Lookup Table block and figure out the proper data for it.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!