Reputation
790
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 17
Impact
~10k people reached

12h
comment Listing elements starting from 0
It may simply be a matter of (bad?) taste to not use zero as a cardinal number: Does non-machine-communication - there are still some non STEM-hominides around - really gain from a "zeroth" position indicator? Again I would be totally indifferent with regard to a subscript or index value of zero which will be easily implemented. Just a very personal opinion.
May
22
comment Constraints for LP
If you are doing Linear Programming you might also take a look at this.
May
22
comment ODE fitting to dataset
Just a minor advice but it really pays out to not use symbols in one's code that start with capital letters. By doing so there is complete safety as of not interfering with Mathematica's definitions. Eg. variables C or D or N already demonstrate the case.
May
21
comment How to eliminate variables when using Solve[]
As I had posted with another question for Reduce (cf. Mr.Wizard's entry below). The feature is still documented and can be found here‌​.
May
21
comment Behavior of Reduce with variables as domain
@Mr. Wizard - probably. There is of course also Reduce[ Eliminate[x + y == 1 && x y == 2, y] , x].
May
21
comment Behavior of Reduce with variables as domain
It seems to still be documented as can be seen here‌​? Isn't Reduce a sepecial instance of Solve, eg. with the option Method->Reduce?
May
20
comment Problem using NDSolveValue
You may try the option SolveDelayed -> True and take a look at this.
May
20
comment Plot ParametricNDSolve
Set ´a[0] ==b[0] == 1` then use something like f = a[3] /. sol where 3 is the parameter value for w. You can then do Plot[ Evaluate@Abs[ f[t] ]^2 , {t,0,100},PlotRange -> All ]. Seems to work out fine.
May
20
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Michael E2 - That is a nice idea, albeit it does get cumbersome. I probably will go for your Mod[t, 1] solution and adapt the EventSeries accordingly as stated. After all a model is a model and not 'reality' - some compromise has to be made eventually.
May
20
comment Plot ParametricNDSolve
Won't you need initial conditions, eg. a[0] == somevalue and b[0] == somevalue?
May
20
comment NDSolve computes wrong solution?
This problem still persists as of Version 10.1
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Thank you. I corrected your WhenEvent solution to show x1'[t] == 0. Also note, that one can very well use this kind of event management with Euler - in fact I am using it to do the sampling-importance resampling with the particle filter. The latter is the reason I (believe) to need a fixed time step as equation and measurement noise are defined as discrete stochastic processes. Maybe I will not need fixed steps after all?
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Michael E2 - Sorry, now it was my reading too fast; I never really noted the meaning of DiscontinuityProcessing in your solution. Nevertheless, this whole post -- including the ?NumericQ reminder -- has been very helpful to me. Thanks.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Miachael E2 - Hmm, you never did mention _?NumericQ and your answer did not solve my problem whose premise was to use ExplicitEuler with a fixed solution step size. Your solutions proposed a different method or choosing a smaller time step or employing the DiracDelta-function all of which vialote my premises. On this forum we might be that precise and if we are it is not about liking but about arguments and reason(ing). ;-)
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@chuy Thanks a lot - that indeed solves the issue and I really have to think hard about why it does.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
I now also checked with different StepSizes ( 1/16, 1/8, 1/4 ) where of course the pulse width and the multiplier for g(t) are modified accordingly. The problem does persist without exception and the whole thing in my opinion smells like a bug in the implementation of Euler-Integration in Mathematica.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
One needs to increase PlotPoints; I used Plot[{g[t], b[t]}, {t, 0, 10}, PlotRange -> All, PlotPoints -> 1000, PlotTheme -> "Detailed", ImageSize -> Large].
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Phab that is exactly the plan. Each pulse should integrate to one. For simple Euler integration there should also not be any discontinuities.
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Thanks for showing the DiracDelta- function but I had mentioned and excluded that possibility in my post: Naturally in continuous time a sequence of DiracDelta-Functions would be the way to go but I have found them to be incompatible with EulerIntegration method so far.
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Thank you for pointing that out; unfortunately that is only a 'copy error' -- in my notebook I had the correct definition and all results given are correct. I have updated the definition of b(t) now.