Hi, I’m new to JULIA. I am trying to solve a system of differential equations, but I get the same error “MethodError: no method matching diffeq! (:: Vector {Float64}, :: Vector {Float64}, :: SciMLBase .NullParameters, :: Float64)”
this is the system of equations, and this is my code:
Blockquote
E = 200e9 # Pa
A = (0.01)^2 # m^2
L = (0.0,2) # m length beam
b = 1000 # N/m
P = 250 # N
EE(x) = E
AA(x) = A
bb(x) = b
function diffeq!(x,y)
dy = zeros(2,1)
dy[1] = y[2]/EE(x)*AA(x)
dy[2] = -bb(x)
return dy
end
and the conditions are:
function bc2!(y1,y)
y1[1] = 0
y[2] = P
end
bvp2 = BVProblem(diffeq!, bc2!, [0,0,0,0], L)
sol1 = solve(bvp2, GeneralMIRK4(), dt=0.05)
I need your help, what am I doing wrong ?, I come from MATLAB, and I used bvp4c.