필터 지우기
필터 지우기

solve matlab ode system inside simulink subsystem

조회 수: 1 (최근 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 CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by