solve matlab ode system inside simulink subsystem

1 visualización (últimos 30 días)
Alessandro Vitiello
Alessandro Vitiello el 1 de En. de 2022
Respondida: Sivani Pentapati el 6 de En. de 2022
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

Respuestas (1)

Sivani Pentapati
Sivani Pentapati el 6 de En. de 2022
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.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by