Index exceeds the number of array elements (1)
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!