Beantwortet
what's wrong my code about ode model
What is Cprime ? % Define the parameter values k = 1.2; %killing rate of cancer cells by T cells r_C = 1/1.0; % Logistic grow...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
polyfit vs csapi revolve - can't square the integral on csapi
Take a look here on how to to generate a spline function squared and integrate it: https://de.mathworks.com/matlabcentral/answe...

etwa 3 Jahre vor | 0

Beantwortet
How to pass an array into the initial condition function while using pdepe
However after the solution (1xn array) is achieved, i perform some other calculation and then i want to feed the end result back...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why I got an error in "plot(X1,sqrt(2*g*X1)*tanh(sqrt(2*g*X1)/(2*L)*t),'o')" in the following code??
Seems you got the derivative wrong. % Constants g = 9.81; % m/s^2 v = 4; % m/s t = 3.45; % s L = 5; % m X0 = 3; % m Es = ...

etwa 3 Jahre vor | 0

Beantwortet
Dsolve solves differential equation with a very long output, is something wrong?
syms lambda mu real positive syms t p1(t) p2(t) p3(t) eqn1 = diff(p1,t) == -5*lambda*p1 + mu*p2; eqn2 = diff(p2,t) == 5*lambd...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Extracting an intermediate vector from ode45
Use s = zeros(numel(t),1); u = s; z = s; for i = 1:numel(t) [~, s(i),u(i),z(i)] = smc_obsv(t(i), x(i,:)); end instead o...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to numerically solve system of equations and differential equations simultaneously?
MATLAB's ode solvers allow a mixture of differential and algebraic equations as in your case. These systems are called differen...

etwa 3 Jahre vor | 2

Beantwortet
Plot a quadrilateral having 8 points (each side passes through two points)
P1 = [0 0 0]; P2 = [1 0 0]; P3 = [0 1 0]; P4 = [0 0 1]; P5 = [1 1 0]; P6 = [0 1 1]; P7 = [1 0 1]; P8 = [1 1 1]; hold on ...

etwa 3 Jahre vor | 0

Beantwortet
ode45 taking too long to solve set of ODEs.
Try to use ode15s instead of ode45. And prescribe the vector of output times. Otherwise ode45 will save all of its successful i...

etwa 3 Jahre vor | 0

Beantwortet
How to get a better fit with given equations that would approximately match given data output?
Use rng("default") as first line in your code.

mehr als 3 Jahre vor | 0

Beantwortet
Finding a nonlinear equation root
fun = @(x)cosh(x).*cos(x)+1; icount = 0; for i = 1:2:21 x0 = i*pi/2; icount = icount + 1; xroot(icount) = fzero(fun,x...

mehr als 3 Jahre vor | 0

Beantwortet
Problen with optimization of two parameters, and with differential equations
All curves that stem from your model tend to sqrt(keq/(1+keq)). Since your measurement data tend to 0.5, my guess is that you ha...

mehr als 3 Jahre vor | 0

Beantwortet
Problen with optimization of two parameters, and with differential equations
The parameters you want to fit are not independent. Since T remains constant, the complete expression k0*exp(-Ea/(8310*T))*cc*...

mehr als 3 Jahre vor | 0

Beantwortet
How to use fmincon's constraintviolation option
Can you tell me what I'm doing wrong? You try to betray yourself that your problem has a solution. But it has none.

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Solving Integral in matlab
syms s a=sym('1'); b=sym('71/100'); c=sym('53/100'); f = 1/((s+a^2)*(s+a)*(s+b)*(s+c)); F = a*b*c/2*int(f) limit(F-subs(F,...

mehr als 3 Jahre vor | 0

Beantwortet
im looking for the error in the following code, please help
DalphaS = CaputoDerivative(S(1:n),alpha,dt); DalphaI = CaputoDerivative(I(1:n),alpha,dt); DalphaR = CaputoDerivative(R(1:n),al...

mehr als 3 Jahre vor | 0

Beantwortet
Systems of Trigonometric Equation does not return any value
You get contradicting results for theta10. Thus your system is not consistent. format long AB = 105.58445229; CD = 16.557818...

mehr als 3 Jahre vor | 0

Beantwortet
I couldn't match the index no., can anyone please help me to resolve this issue.
yita_mn has size 6x6, but your loop in which you access yita(i,j) runs for i = 1:16 and j = 1:16. And dy should be allocated as...

mehr als 3 Jahre vor | 0

Beantwortet
Drawing a heatmap of the max value of a state variable against two parameters in the system
tspan = 0:0.01:100; y0 = [100000;0;0;1;0]; p = 0.001:0.001:0.01; eta = 0.001:0.001:0.02; for i = 1:numel(p) for j = 1:num...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
volume of a packed bed reactor
One main error in your code is that you use variables that you define later on. Programming works sequentially: If you define a...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Finding random normally distributed number above zero
Maybe taking abs(randn()) will give you something useful. It's the folded normal distribution (which in this case equals the tru...

mehr als 3 Jahre vor | 0

Beantwortet
Need to remake this optimize function to be efficient takes way to long currently
You can easily solve when det(m) = 0 in advance and insert the formula in your code. This will enhance speed enormously: syms p...

mehr als 3 Jahre vor | 1

Beantwortet
numerical integration of array
lam = 0.5; nCk = @(n,kVec,z)arrayfun(@(k)nchoosek(n,k)*exp(-lam*k*z),kVec); integral(@(z) nCk(10,1:5,z),0,1,'ArrayValued',true...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
ode45 how to write differential equation (within function) that incorporates itself at previous time stamp
This is a delay differential equation. Use dde23 to solve. What are the variables you solve for in the equation dIdt = V*S+ep...

mehr als 3 Jahre vor | 0

Beantwortet
calculate integral of this function
F1 = double(int(dM_dH^2/cos(theta),x,0,Pi)) instead of F1= integral(@(x) (dM_dH).^2/cos(theta),0,Pi)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Seventh order differential equation
% Set model parameters l = 1; P = 1; Ga = 1; Eatilde = 1; ha = 1; E1tilde = 1; h1 = 1; E2tilde = 1; h2 = 1; xmesh = ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Ode45 calling a matrix and an array in a function
Your arguments to q_dot are inverted: Use function q_dot = q_dotf(ts,q) instead of function q_dot = q_dotf(q,ts) And note t...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Stability analysis of a non-linear ODE system
syms Sci C Sr Sh R Cf Cp Ce E HR H Sp P k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13 k14 k15 k16 p1 p2 p3 mu eta alpha theta CL F...

mehr als 3 Jahre vor | 1

Beantwortet
How to solve the parameters of a diffusion model?
Make a code to determine the roots of your second equation. Make a code that evaluates the infinite sum to determine q_t from y...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
The error is " Unrecognized function or variable 'Vmp' " on line 21, but i need to find the root of Vmp(which is -0.05). Can anyone help me with this??
A fixed point iteration for your function does not converge. Didn't you see this in your former question ? And if it worked, g ...

mehr als 3 Jahre vor | 0

Mehr laden