Simulation data storage- help
1 次查看(过去 30 天)
显示 更早的评论
Hello, I want to store the steady state value of output signal(as displayed in display block) in mat file and get it displayed in the command window. I am using sim command to run the simulation. When I use the 'to file' block, it stores struct or array of signals, How to store only steady state value, and get it displayed in command window? Alos. how to use mat file?? Please help.
Thanks & Regards- Anuj
采纳的回答
更多回答(1 个)
Ilham Hardy
2013-12-12
Say:
- Your filename is 'untitled.mat' and located in your current folder
- Variable name stored is 'var_1'
- The "To File" block is connected to single input (no Mux)
Solution:
After simulation, run commands below in the Command Window
load untitled
var_1(2:end)
Remarks:
- You only want to show steady-state value which in this case the last value (simulation time -wise)
- var_1 is 2xn matrix, the first column contains t_sim and second clumn contains var_1 value
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!