To Workspace Block - Output Array Size Problem
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I am working on a script that runs a simulink model that gets inputs from the script and forwards the output to the workspace. However, even though the input is a constant value, the output results in a 51*1 size array. Is there any chance to change the size of the output as a 1*1 array (like a constant value)?
Best regards
0 个评论
采纳的回答
Fangjun Jiang
2019-11-13
编辑:Fangjun Jiang
2019-11-13
A Simulink simulation runs for a period of time. The output being 51x1 size array probably means the simulation ran for 50 steps. You could change the time to make it run just one step but that would not be a typical Simulink simulation. Maybe you just need to make it a MATLAB function dealing with input and output.
2 个评论
Fangjun Jiang
2019-11-13
Set the Solver, Step time, Stop time
Or just click "Step Forward" once/twice and then Stop.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!