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

8 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...

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 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*(...

8 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...

8 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 ...

8 years ago | 0

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

8 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*...

8 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 ...

8 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.

8 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 ...

8 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;-...

8 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...

8 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 ...

8 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.

8 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...

8 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(...

8 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...

8 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...

8 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...

8 years ago | 0

Answered
Solving non-linear SECOND ORDER ODE BY MATLAB
Use "bvp4c" with its option for "Multipoint Boundary Value problems": https://de.mathworks.com/help/matlab/ref/bvp4c.html#b...

8 years ago | 0

Answered
Solving non-linear PDE
Rewrite the equation as [(5+c)^2/{(5+c)^2+5}]^(-1) * dC/dt = d^2C/dx^2 and use MATLAB's "pdepe". Best wishes Torst...

8 years ago | 0

Answered
how to solve for y, all other variables are known. Qave - (1/n).*((y.*(b+2.*y)).^(5/3)/(b+2.*y.*sqrt(1+m.^2)).^(2/3)).*sqrt(S0)= 0
You will have to define y as syms, not as zeros(1,1000). But my guess is that your equation has no analytical solution. Thus ...

8 years ago | 0

Answered
How can I solve a non homogeneous diff equation numerically?
k=23; m=9.1093821545*1e-31; w=sqrt(k/m); hb=(6.6260695729*1e-34)/(2*pi); E0=hb*w*.5; M=@(x,y)[y(2);(hb*w*.5-....

8 years ago | 0

| accepted

Answered
I am using fsolve and receiving errors
Add disp(F) at the end of solar5d. I suspect that the array F contains Inf, NaN or something similar. Take care ...

8 years ago | 0

Answered
Hello! Is it possible to solve a system of differential equations in matlab without using symbolic functions?
https://de.mathworks.com/help/matlab/ref/ode15s.html https://de.mathworks.com/help/matlab/ref/ode45.html Best wishes To...

8 years ago | 0

| accepted

Answered
Solve 1-D interfacial mass transfer using pdepe
First of all one error in your actual code: qr=1 instead of qr=D. If you set qr=D, your boundary condition reads h*(Cp...

8 years ago | 0

| accepted

Answered
there are something wrong with solving DAEs by using ode15s
Differentiating your constraint you get Differentiating once: 2*x*x'+2*y*y'-2*((z-ZB)*(XA-XB)/(ZA-ZB)+XB)*(XA-XB)/(ZA-ZB...

8 years ago | 0

| accepted

Answered
Solving Boundary Value Problem in 2D
Interpret x as time(t) and y as length(x) and use MATLAB's "pdepe". Best wishes Torsten.

8 years ago | 0

| accepted

Load more