- ‘SimulinkBus’: https://www.mathworks.com/help/simulink/slref/simulink.bus.html
- ‘Simulink.BusElement’: https://www.mathworks.com/help/simulink/slref/simulink.buselement.html
- ‘timeseries’ function: https://www.mathworks.com/help/matlab/ref/timeseries.html
Create Test Vectors with structures of busses in sltest.TestCase
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to write a test case where I have an input that is a bus containing multiple busses that is fed into a simulink model when called via the sltest.TestCase class. For certain tests, the majority of the input bus structure values can be set to zero and I would prefer not to have to manually initialize each parameter.
Is there a clean way to create an input test vector of time series objects with the same structure as my input bus?
Thanks,
Taylor
0 个评论
回答(1 个)
Manikanta Aditya
2023-4-21
Hi Taylor,
As per my understanding, you are interested to know if there is a way to create an input test vector of time series objects with same structure as your input bus.
You can use ‘Simulink.Bus’ and ‘Simulink.BusElement’ classes in MATLAB to define the structure of your input bus, and then use the ‘timeseries’ function to create a time series object with the same.
Please refer to the following documentation for more info on:
I hope this resolves the issue you were facing.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Inputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!