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

Torsten
Torsten 2023년 6월 7일
Check whether the sizes of t, y(:,2) (e.g.) and u are equal.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

질문:

2023년 6월 7일

댓글:

2023년 6월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by