
Help understanding example for Inlining Matlab S-function
1 回表示 (過去 30 日間)
古いコメントを表示
In https://au.mathworks.com/help/rtw/tlc/introduction-inline-s-functions.html#f34125, I am trying to follow the example under the heading "Inline MATLAB File S-Functions"
Step 5 is unclear:
"Step 5 :On the Signal Attributes tab of the Inport Block Parameters dialog box, set the Port dimensions parameter to 5."
What do I need to click on to find this? Where do I find the "Inport Block Parameters dialog box"?
Thanks,
0 件のコメント
採用された回答
galaxy
2019 年 11 月 6 日
You double click to Inport block, choose the Signal Attributes tab

3 件のコメント
galaxy
2019 年 11 月 6 日
I think step 5 for example about code generation from S-Function block.
So when you change contant block to inport block, generated code will same below.
/* S-Function (timestwo): '<Root>/MATLAB S-Function' */
/* Multiply input by two */
{
int_T i1;
const real_T *u0 = ×2_B.Gain[0];
real_T *y0 = ×2_Y.Out1[0];
for (i1=0; i1 < 5; i1++) {
y0[i1] = u0[i1] * 2.0;
}
}
5 dimenssion of inport is maximum of for loop
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!