User Portlet
| Discussions |
|---|
| Hi, I have an NDSolve that requires an NSolve solution at each time step: a[t_] := A /. NSolve[x[t]*A == 1 - x[t]^2]; NDSolve[{x'[t] == 2*a[t]*x[t], x[0] == 2}, {x[t]}, {t, 0, 1}]; Plot[x[t]/.%, {t, 0, 1}] Which should result... |
| Thanks, Gianluca. Although, my problem is not resolved yet. I created a simple code that generates the same warning messages: Eqn = {}; For[ns = 1, ns > {{X[[1, 1]] -> 0.5, X[[1, 2]] -> 2., X[[2, 1]] -> 0.25, X[[2, 2]] ->... |
| I am new to Mathematica compilation, so I was wonderign if you can help me compile a sample DLL for MSC Adams/Solver. I have done this before in Fortran and the header reads as SUBROUTINE envelope(ID, TIME, PAR, NPAR, DFLAG, IFLAG,... |
| Found the answer. I will use Piecewise function in the definition of the derivative. |