Error in trapz in MatLab

11 visualizaciones (últimos 30 días)
Nezi
Nezi el 7 de Jun. de 2023
Comentada: Torsten el 7 de Jun. de 2023
I get an error "Error in trapz (line 42)
perm = [dim:max(ndims(y),dim) 1:dim-1];" for the code
J = trapz(t, y(:, 2) + y(:, 3) + y(:, 4) + y(:, 5) + K/2*u.^2);
  1 comentario
Torsten
Torsten el 7 de Jun. de 2023
Check whether the sizes of t, y(:,2) (e.g.) and u are equal.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation 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