SciFracX / FractionalDiffEq.jl

Solve Fractional Differential Equations using high performance numerical methods
https://scifracx.github.io/FractionalDiffEq.jl/dev/
MIT License
80 stars 11 forks source link

FODEMatrixDiscrete algorithm not working with some functions #78

Closed khaledharizb closed 1 year ago

khaledharizb commented 1 year ago

I would like to solve the following problem where the righfunc is given by 8 if x<= 0 and 0 otherwise. However, with FODEMatrixDiscrete() algorithm does not work

h=0.075
f(x) =  (x <= 1) ? 8 : 0;
prob = MultiTermsFODEProblem([1, 1 , 1], [2, 3/2 , 0],  f , [0, 0], (0, 30))
sol = solve(prob, h, FODEMatrixDiscrete())

This example from http://www.mathworks.com/matlabcentral/fileexchange/22071 where the same algorithm is used by Matlab.

ErikQQY commented 1 year ago

Solved in #54