Please help me with code for the below ode

5 visualizaciones (últimos 30 días)
Karthik K
Karthik K el 26 de Ag. de 2019
Comentada: Walter Roberson el 27 de Ag. de 2019
  6 comentarios
Karthik K
Karthik K el 27 de Ag. de 2019
This is a base excitation probem in vibration
equation_of_motion.jpg
Walter Roberson
Walter Roberson el 27 de Ag. de 2019
You have
function f = forced_coulomb_base(t,x,y)
so forced_coulomb_base expects to be passed three variables.
You have
[t,x,y]=ode45(@forced_coulomb_base,tspan,x0,y0);
ode45 passes two parameters to the function: the independent variable in the first parameter, and the boundary conditions in the second parameter.
You cannot calculate two separate ode by passing them as additional parameters and expecting additional outputs: all boundary conditions must be passed in a single variable, and all calculations must be returned in a single variable.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by