Index exceeds the number of array elements (1)

조회 수: 1 (최근 30일)
Dursman Mchabe
Dursman Mchabe 2019년 1월 6일
Hi everyone,
I am learning how to use lsqcurvefit when solving DAEs using a simple case on the attached code. At the moment I am getting an error message:
Index exceeds the number of array elements (1).
Error in sym/subsref (line 870)
R_tilde = builtin('subsref',L_tilde,Idx);
Error in SimpleExcersize (line 12)
eqn1 = diff(x(t),t) == (1 / b(1)) * (b(2) * b(3) - b(2) * x(t)) - ((x(t) * b(4) * b(5) - b(6) * ((y(t) * z(t).^2)/(z(t).^2 + b(12) * z(t) + b(12) * b(13)))) / (1 / b(7))
+ (b(6) / (((b(8)*((b(6)*x(t) * b(4) * b(5))- ((y(t) * z(t).^2)/(z(t).^2 + b(12) * z(t) + b(12) * b(13))))+ b(9)* ((b(12) * b(6) * x(t) * b(4) * b(5) / z(t))-((y(t) *
b(12) * b(13))/(z(t).^2 + b(12) * z(t) + b(12) * b(13))))+ b(10) *((b(12) * b(13) * b(6) * x(t) * b(4) * b(5) / z(t).^2) - ((y(t) * b(12) * b(13))/(z(t).^2 + b(12) * z(t)
+ b(12) * b(13))))) / (b(8) * ((b(6) * x(t) * b(4) * b(5))- ((y(t) * z(t).^2)/(z(t).^2 + b(12) * z(t) + b(12) * b(13)))) * b(11))))));
How can I modify the code?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by