In this case however, the DAE system is of index 1, since the ode15s is able to solve the system when the value of parameter A=1e-10. The ode15s solver may also generate this error when the "InitialSlope" used to initiate the solution is inaccurate. This issue can be addressed in a couple of ways:
1) Increasing the number of function evaluations using the "odeset" function:
2) Providing a consistent "InitialSlope" to the ode15s solver:
An alternative approach is to provide the "InitialSlope" as an additional input parameter to the "ode15s" solver using the "odeset" function. The "fsolve" function in MATLAB, which solves a system of nonlinear equations, can be used to compute the initial slope. Moreover, the "fsolve" method offers greater control and flexibility in computing the InitialSlope using the "optimoptions" function.
For a system of the form:
M * (dy/dt) = systemDAE(t, y)
with the initial slope "yp" can be estimated by solving the non-linear equation
implicitDAE = @(yp) M*yp - systemDAE(0, y0)
where "y0" is a guess for the initial value of "y".
The initial slope can be computed using the "fsolve" function as:
yp = fsolve(implicitDAE, y0, options)
where "y0" is the initial guess provided for the initial slope, and the "optimoptions" function is used to set the options parameter.
Best Answer