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 Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by