You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using DifferentialEquations, RecursiveArrayTools, Plots, DiffEqParamEstim
function f2(du,u,p,t)
du[1] = dx = p[1]*u[1] - p[2]*u[1]*u[2]
du[2] = dy = -p[3]*u[2] + p[4]*u[1]*u[2]
end
u0 = [1.0;1.0]
tspan = (0.0,10.0)
p = [1.5,1.0,3.0,1.0]
prob = ODEProblem(f2,u0,tspan,p)
sol = solve(prob,Tsit5())
t = collect(range(0,stop=10,length=200))
randomized = VectorOfArray([(sol(t[i]) + .01randn(2)) for i in 1:length(t)])
data = convert(Array,randomized)
vals = 0.0:0.1:10.0
plot(vals,[cost_function(i) for i in vals],yscale=:log10, xaxis = "Parameter", yaxis = "Cost",
title = "Parameter Cost Function", lw = 3)
hi im learning parameter estimation but problem is plotting cost function with multiple parameters as a example.
With Boundserror could not be plotted
im literally noob with code, i was trying tof fix it but i could not...
How can i get plot ?
The text was updated successfully, but these errors were encountered:
hi im learning parameter estimation but problem is plotting cost function with multiple parameters as a example.
With Boundserror could not be plotted
im literally noob with code, i was trying tof fix it but i could not...
How can i get plot ?
The text was updated successfully, but these errors were encountered: