Index exceeds the number of array elements (1)
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!