Questions tagged [ode45]

140 questions
0
votes
0 answers

Crank Nicolson MATLAB

Is there any inbuilt solver in MATLAB that solves a given ODE (order>1) using Crank-Nicolson Method? (Note that I have a system of ODE's, so I might solve each one of them using Crank-Nicolson. I tried ode45, but I am not getting correct results)
-1
votes
2 answers

how to replace the ode45 method with the runge-kutta in this matlab?

I tried everything and looked everywhere but can't find any solution for my question. clc clear all %% Solving the Ordinary Differential Equation G = 6.67408e-11; %Gravitational constant M = 10; %Mass of the fixed object r = 1; %Distance…
Ali Haydar
  • 13
  • 3
-1
votes
1 answer

system of differential equations with ode45 in matlab

I have got this model for glucose and insulin, and system of differential equations: Where: G(t) - the plasma glucose concentration at time t I(t) - the plasma insulin concentration at time t X(t)- the interstitial insulin at time t Gb - the basal…
tobi245
  • 1
  • 1
-2
votes
1 answer

Error tolerance not working in C++, when plotted against ODE45 in MATLAB

I am comparing the ODE solver of C++ (BOOST ODEINT) against MATLAB's ODE45. Each set of code has the same equations and initial conditions. When error tolerance is added to the C++ code, the difference between the two values (C++ and MATLAB) is…
Jon Snow
  • 1
  • 1
-2
votes
1 answer

MatLab ode45 explanation

For a project I need to understand a matlab code, but as I am quite new I dont really understand what is happening. I have a function file and a script file. Function: function dxdt = sniffer_ode(t,x,par,tu) X = x(1); R = x(2); k1 = par(1); k2…
Joel
  • 3
  • 2
1 2 3
9
10