solve matlab ode system inside simulink subsystem

5 ビュー (過去 30 日間)
Alessandro Vitiello
Alessandro Vitiello 2022 年 1 月 1 日
回答済み: Sivani Pentapati 2022 年 1 月 6 日
Hi, I have a matalb ODE code, that solves a set of differential equations.
I want to put all inside a simulink subsystem, and execute the code into a Simulink project.
but I have this error:
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Component:MATLAB Function | Category:Coder error
Function 'ode113' not supported for code generation.
Function 'MATLAB Function1' (#24.2038.2424), line 97, column 1:
"[t_sm,X_sm] = ode113(@(t_sm,X_sm) eq_motoTime(t_sm, X_sm, n, dh_des, S3_0, x_r, "
Launch diagnostic report.
I understood that I have to tell to simulink ho read 'ode' and my function, but I am not understanding how.
May someone help me ?
Many thanks for your time and help.
Kind Regards

回答 (1 件)

Sivani Pentapati
Sivani Pentapati 2022 年 1 月 6 日
Hi Alessandro,
I think you are facing this error becuase ode113 solver does not support code generation. You can try using other solvers, ode23, ode45, ode78, ode89 which work for non stiff differential equations similar to ode113 and also support code generation. Please refer to this link for the list of functions that support code generation.

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by