How do I output an array from my level 2 S Function? Please help!
古いコメントを表示
Hi there,
I have a S function that takes arrays as inputs from an excel file and does computations using the arrays. The ultimate result in the S function block is a Nx1 array. I have tried assigning the Nx1 array to the sFunc.OutputPort(1).Data, but it gives me error saying I am attempting to assign a length N vector to a length 1 vector.
I want to be able to output the array and feed it into another S function in Simulink and to a scope to plot the data against another array (time).
Any help would be greatly appreciated!
Thanks!
1 件のコメント
回答 (1 件)
Kaustubha Govind
2012 年 7 月 16 日
1 投票
Have you configured block.OutputPort(1).Dimensions to N?
2 件のコメント
Chuhong
2012 年 7 月 16 日
Kaustubha Govind
2012 年 7 月 17 日
What is the S-function output connected to? Is it a block that is expecting a scalar somehow? Try connecting it to an Outport block to make sure that there is no backward propagation happening.
カテゴリ
ヘルプ センター および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!