Array Creation in simulink with size value from a simulink block
2 次查看(过去 30 天)
显示 更早的评论
Hii... I need to do ones(1,N) in simulink , where N comes from a output of a simulink block (N is a integer). I dont want to use matlab functions. Any ideas would be useful.
0 个评论
回答(1 个)
Sulaymon Eshkabilov
2022-12-28
One of the possible options is to use the [eye] and extract diagonal blocks - see attached simple Simulink model. The size of the identity matrix (diagonal) should be defined in MATKLAB workspace.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!