Reputation
2,327
Next privilege 2,500 Rep.
Create tag synonyms
Badges
2 9 33
Impact
~25k people reached

11h
comment How to do System dynamics simulations / diagrams in Mathematica?
Very interesting answer. Would the Control Systems Framework be able to handle vector equations and could something like WhenEvent be included as in the NDSolve framework? (e.g. what are the downsides of control systems framework as compared to NDSolve)
17h
comment Dynamical system problem x(t+1) = Ax(t)
Take a look at RSolve and also MatrixPower for a start.
18h
comment Issues with modeling pulses in a very simple system of DAEs
Thank you, the WhenEvent solution works nicely. Would you consider the described behavior for DiracDelta a bug? I may underestimate the difficulties in DAEs, but it seems simple enough here so that DAE vs. ODE should not make a difference maybe?
1d
accepted Issues with modeling pulses in a very simple system of DAEs
Apr
28
revised Issues with modeling pulses in a very simple system of DAEs
added some comments in the code
Apr
28
comment Issues with modeling pulses in a very simple system of DAEs
I updated the OP to account for the workaround proposed by @MichaelE2 which unfortunately does not seem robust.
Apr
28
revised Issues with modeling pulses in a very simple system of DAEs
added a more complex example
Apr
28
comment Issues with modeling pulses in a very simple system of DAEs
That works for the simple case I gave, but if you try y[0] == x[0], y[t] == x[t] it does not look very reassuring. In a more complex model I am also noting that "EquationSimplification" -> "MassMatrix" unfortunately does not reliably fix the problems with DiracDelta pulses.
Apr
28
comment Issues with modeling pulses in a very simple system of DAEs
@Quantum_Oli Yes, I indeed noted, that ODEs do not present a problem, but you should be able to model $y(t) = g( x(t), u(t),t)$ as it is done for control system modeling in Mathematica (which internally uses NDSolveafaik?). Using output functions $y(t)$ will work fine for ODE without pulses btw.
Apr
28
comment How to write this iterative sequence function in mathematica
Will I get paid or will I get credit for doing your homework? So far I can see no effort on your part whatsoever.
Apr
28
asked Issues with modeling pulses in a very simple system of DAEs
Apr
24
reviewed Reject Writing a word with straight lines
Apr
22
revised What is the meaning of “/.”?
removed tag and added replacement-tag
Apr
22
comment Problem with PlotLabels
As a workaround: I note that the problem only arises, when the labels are placed automatically. So Placed[ lbl, pos ] will work, if pos is different from Automatic. In the given example this will work: ListLinePlot[{1, 1, 2, 3, 5, 8}, PlotRange -> {All, {5.5, 6}}, PlotLabels -> Placed[1, {0.9, 0.7}]] where the position specs are relative fractions of the plot's region.
Apr
20
comment Fast implementation of Metropolis-Hastings update with multiple sets
Related: 111224.
Apr
19
comment Fitting 6 differential equations to 6 sets of data
The 1D case is shown in the documentation ("Applications") for ParametricNDSolveValue; an example for the multivariate case is given in this answer.
Apr
18
comment Segmentation fault on auto-complete
I can confirm that this solution works with regard to my above comment. My CodeAssistHistory10.4m had a size of 712 MB at the time of deletion.
Apr
18
comment Segmentation fault on auto-complete
I have just noted a similar behavior on 10.4 (Win 10 Pro), where all text inputs after two characters suddenly stopped as can bee seen in this capture of the problem. Unfortunately I was pointed to this post too late - I am just reinstalling Mathematica...
Apr
12
revised Importing a large Excel file
corrected syntax error
Apr
12
reviewed Reject How to solve this PDE in mathematica?