MATLAB Answers

Simulink MATLAB Function fully interpreted in MATLAB

6 ビュー (過去 30 日間)
Piotr Pawlowski
Piotr Pawlowski 2019 年 8 月 5 日
Commented: Piotr Pawlowski 2019 年 8 月 8 日
Hi, I have some problem with MATLAB Function Simulink block.
I added this block to my simulink model and provided three inputs. All I want to do is to process those inputs at fixed sample time (say 0.1s) and cook out some outputs, all within MATLAB. Simulink constantly shows errors with code generation, even simple functions like size(x). Is there any way to process input data from simulink signal fully on MATLAB?
Thanks in advance

  0 件のコメント

サインイン to comment.


Jyotsna Talluri
Jyotsna Talluri 2019 年 8 月 8 日
Some functions are not supported in MATLAB function block. Instead you can use S function block in Simulink which can incorporate a MATLAB code. Inputs from Simulink are automatically passed to S-function. We can specify sample time in code itself.
To know about S-functions refer to the below link

  1 件のコメント

Piotr Pawlowski
Piotr Pawlowski 2019 年 8 月 8 日
Thanks very much. Just like I thought. I will give a shot to S-functions :)

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

Translated by