How to dynamically size arrays in Simscape custom component?
古いコメントを表示
I am trying to create a custom Simscape component that can accept input/output arrays of a variable size. The size would be chosen by the user and sent to the component to declare the arrays (this is a heat exchanger that is divided into a number of segments). Here is what I am looking to do, essentially:
component heat exchanger
inputs
segments = 1.0;
hin = {segments,'J/kg'}; %hin:left
end
outputs
hout = {segments,'J/kg'}; % hout:right
end
...
Is there any way to elegantly do this? With custom Simulink components, I just used S-function parameters to do this.
Thank you.
回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Composite Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!