Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
4 votes
1 answer
237 views

I am using spectral method to solve an ordinary differential equation. The following R code and the MATLAB code are completely the same. But the R code gets explode (the u value it solved would become ...
Asigan's user avatar
  • 215
1 vote
0 answers
114 views

Any idea why dsolve in sympy 1.14 when given this ode Eq(x**a * y(x) + Derivative(y(x), (x, 2)),0) gives error TypeError: 'Symbol' object cannot be interpreted as an integer code from sympy import * x ...
Nasser's user avatar
  • 13.3k
2 votes
2 answers
187 views

I am trying to model a fatigue crack growth in Python using Paris’ law : da / dN = C ( DeltaK ) ^ m where : a = crack length N = load cycles C, m = material constants ( DeltaK ) = Y.( DeltaSigma ).( ...
0 votes
0 answers
124 views

I am trying to solve a convection-diffusion-reaction problem for a tubular reactor. The reaction governing the process is as follows: The method I chose to solve it is the line method, which consists ...
2 votes
2 answers
118 views

I would like to compute the residual of the numerical solution to an ordinary differential equation. Here is the code import numpy as np from scipy.integrate import solve_ivp def f(t, x): return ...
2 votes
0 answers
66 views

I’ve written a MATLAB implementation of an implicit Runge–Kutta method (Radau IIA). It behaves well on most test problems, but it refuses to converge on the following very stiff equation like y' = y^2 ...
1 vote
2 answers
63 views

I am trying to add a legend to each plot output of the ccl4model(ODE model) in the deSolve package using plot.deSolve and the legend method but it only appears on the last plot output of the model. I ...
0 votes
1 answer
91 views

I ended up trying to build a for-loop to achieve my end goal (running an ODE function modeling disease transmission through different scenarios/parameter sets in the most transparent way possible) but ...
0 votes
0 answers
29 views

I'm trying to simulate a satellite tracker. With ode45 I have de state of the satellite for each time and then convert position to Azimuth-Elevation local coordinates. If the object enters in the ...
1 vote
2 answers
126 views

the model Im trying to graph this model however I am just not sure whether my code is leading me to a reasonable solution: import numpy as np import matplotlib.pyplot as plt from scipy.integrate ...
0 votes
1 answer
56 views

I am using the following code. How can I plot time (x-axis) vs C_WT (y-axis) line plots for different C_WT values as in vectorC_WT in a single graph in R ? kon_WT = 1 koff_WT = 10 R_WT = 20 ...
3 votes
2 answers
102 views

I'm modeling the spread of an infectious disease in R, and I need to loop the model through multiple sets of parameters. I have a working model so far (a dummy version is below), but only for a single ...
1 vote
1 answer
90 views

I am trying to solve two coupled differential equations in python using the solve:ivp() function from scipy.integrate but I get an unexplained gain on one of my terms that breaks the equation. It is ...
0 votes
1 answer
37 views

I composed the following ODE file: function [dndt,dmdt,dhdt,dVdt]=hh(n,m,h,V) C=1; GK=36; GNa=120; GL=0.3; EK=-72; ENa=55; EL=-49.4; dndt=(1-n)*alphan(V)-n*betan(V); dmdt=(1-m)*alpham(V)-m*...
צבי's user avatar
  • 31
0 votes
1 answer
67 views

Let us consider the following code: import sympy as sy import scipy as sc from sympy.physics.units.quantities import Quantity from sympy.solvers.ode.systems import dsolve_system from IPython.display ...

15 30 50 per page
1
2 3 4 5
...
133

AltStyle によって変換されたページ (->オリジナル) /