Use a Constant block, specify the value as the variable in the base workspace, then you will be able to use it, no matter what is the size of the matrix. When you construct the code for the MATLAB Function block, click the "Edit Data" button and specify the size of input and output variable.
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/624028-matrix-input-output-to-a-matlab-function-block-in-simulink#comment_1081998
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/624028-matrix-input-output-to-a-matlab-function-block-in-simulink#comment_1081998
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/624028-matrix-input-output-to-a-matlab-function-block-in-simulink#comment_1088378
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/624028-matrix-input-output-to-a-matlab-function-block-in-simulink#comment_1088378
サインインしてコメントする。