Answered
Loop for bvp4c function with an unknown parameter
Maybe sol = bvp4c(@(x,y,S)fourode(x,y,S,k),@(ya,yb,S)fourbc(ya,yb,S,k),solinit,options); Otherwise pass k to fourode and f...

9 years ago | 1

| accepted

Answered
Possible to use values of ones variables to set boundaries in fmincon?
Since x5(t-1) is also a solution variable, you don't have to include it in beq, but you have to set the coefficient of Aeq corre...

9 years ago | 0

| accepted

Answered
Optimize two dependent equations
Use lsqnonlin with the f-vector defined as f=[y1(t1)-y1_obs(t1),y1(t2)-y1_obs(t2),...,y1(tn)-y1_obs(tn),y2(t1)-y2_obs(t1),y...

9 years ago | 0

Answered
How to write a non-standard (four parameter) beta pdf as a symbolic expression?
pd = (x-a)^(q-1)*(b-x)^(r-1)/(beta(q,r)*(b-a)^(q+r-1)) Best wishes Torsten.

9 years ago | 0

Answered
Solving state space equation using ODE45
x0 should be a column vector, not a row vector. Best wishes Torsten.

9 years ago | 0

Answered
Selecting last value of tspan ode45
Function "first" is called several times for the same t-values. Better call the function "first" once more after ode45 has fi...

9 years ago | 0

| accepted

Answered
I am not getting multiple graphs(iterative) when I run the code for a coupled bvp ODE using bvp4c
https://de.mathworks.com/help/matlab/ref/hold.html Best wishes Torsten.

9 years ago | 1

| accepted

Answered
Error in solving system of two reaction-diffusion equations?
"pdepe" is not designed to solve mixtures of partial differential equations and ordinary differential equations (the equation fo...

9 years ago | 0

| accepted

Answered
set function y(t)=0.5*y(t-1)+u(t) with y(-49)=0 and t=-48,..,50
yt(1)=0; for i=1:99 yt(i+1)=0.5*yt(i)+ut(i+1) end where yt(i) represents y(i-50) ut(i) represents u(i-5...

9 years ago | 0

Answered
BVP4C: Error: Unable to solve the collocation equations -- a singular Jacobian encountered
6 equations - 6 boundary conditions, not 7. Best wishes Torsten

9 years ago | 0

| accepted

Answered
I need help with this problem (finite difference method and ode)
How do you know that dy/dt at t=0 has to be 0 in order to reach a height of 5 m after 5 seconds ? Hint: "ODE45" is not the co...

9 years ago | 0

| accepted

Answered
Polynomial angle definition in boundary conditions help
A polynomial cannot have an infinite slope. Best wishes Torsten.

9 years ago | 0

Answered
how can i solve following system of simultaneous equations using matlab
Use ODE45 or ODE15S. Best wishes Torsten.

9 years ago | 0

Answered
how to code the EI[-any number] (exponential integral) in our closed form expression?
I get I = 1-exp(-(A4-1)/T)*(A2*A3*exp((A2+A5)*A3)*expint(A3*(A2+A5))+A3*(A2+A5)*exp(-A3*(A2+A5))-A3^2*(A2+A5)^2*expint(A3*(...

9 years ago | 0

| accepted

Answered
Error using lsqcurvefit (line 251) Function value and YDATA sizes are not equal.
function F=myFunction(a,x) F = a(1)*(1800-x)./(1+((1800-x)/a(2)).^2)-(1800+x)./(1+((1800+x)/a(2)).^2)-a(3); end And m...

9 years ago | 0

Answered
How can I write functions for pdepe based on the information?
PDEPE does not support internal boundary conditions. You will have to discretize your equations in space by yourself using ...

9 years ago | 0

Answered
Need help solving this Navier-Stokes equation
Use "pdepe". Best wishes Torsten.

9 years ago | 0

Answered
How can I solve an integral equation with an unknown kernel?
g is not unique - it can be of any function type you like (we already had this discussion). g(x)=1/integral_{x=0}^{x=2*...

9 years ago | 0

| accepted

Answered
how can i plot this piceise function?
x = 0 : 0.01 : 25; for k = 1 : length(x) if x(k) < 6.7 y(k) = 1200*x(k); elseif x(k) >= 6.7 && x(k) < 12 ...

9 years ago | 0

Answered
Solving a Second order ODE in matlab
Solution is u(x) = -0.5*x^2 + (2+Bi)/(2*Bi) Best wishes Torsten.

9 years ago | 0

| accepted

Answered
integral2 with arrayvalued
function main r1 = 0.0185; r2 = 0.0172; sig1 = 0.2222; sig2 = 0.1450; sigF = 0.1013; rhot = -0.5112; rho ...

9 years ago | 0

| accepted

Answered
How do I solve differential equation in while/for loop using ODE45?
function yprime = cycfun(t,y,K) a = 0.18; b = 0.2; c = 5.7; n = 12; i = 1; f = []; while i < n f = [f;-...

9 years ago | 0

| accepted

Answered
Solving a nonlinear equation with numerical integration
First method: 1. Fit functions B1(lambda), B2(lambda), e1(lambda) and e2(lambda) to your data in the different ranges (500 to...

9 years ago | 0

Answered
I am having trouble multiplying my main ode function with an external function NS which is supposed to be multiplied on the RHS. Thanks for the great help.
zr = [2 3 5 7 10 15 20]; r = [3.5 3.7 4 6 7.2 8 9]; y0 = [0 ; 0.01]; zsol = []; y1sol = []; y2sol = []; for ...

9 years ago | 0

| accepted

Answered
Solving rate equations by using ode45.
Use "dsolve" instead of "ode45". Your complete system has a simple analytical solution. Best wishes Torsten.

9 years ago | 0

Answered
Analytical solution of constrained linear least-squares problems with bounds x ≤ ub
First case: d>0: If there exists an index j with c_j < 0, choose x_j = d/c_j and x_i = 0 for all other indices i<>j. If al...

9 years ago | 0

Answered
Problems solving cupled 2nd Order ODE with od45
M=@(t,y)[y(2);-R*y(2)+((mag1(1)-y(1))/(sqrt((mag1(1)-y(1))^2+(mag1(2)-y(3))^2+(mag1(3))^2)^3)+(mag2(1)-y(1))/(sqrt((mag2(1)-y(...

9 years ago | 0

Answered
fsolve with 3 variable name
At the beginning of the function that "fsolve" calls, set eb(2)=X(1); eb(3)=X(2); eb(4)=X(3); q(2)=X(4); q(3)=X...

9 years ago | 0

| accepted

Answered
How to solve a linear system of equation A
In case A is singular (as A=[2 3; 4 6]), use "pinv" instead of "inv". Look up https://de.mathworks.com/help/matlab/math/sy...

9 years ago | 0

Answered
Can Matlab ODE solver solve this problem
Given p(lambda_i) and q(eta_i), you can determine p(lambda_i+delta_lambda) and q(eta_i+delta_eta) by solving the system of equat...

9 years ago | 0

Load more