Answered
Pdepe set up for Langmuir diffusion process
pdepe can not be used to solve mixtures of partial differential equations (your equation for c) and ordinary differential equat...

9 years ago | 0

Answered
Solving one equation for the value of two variables
syms cA cB AB rA rB eqns = [cA/cB*(rA*cA+cB) == AB*(cA+rB*cB) , cA+cB == 1]; vars = [cA cB]; [solcA, solcB] = solve(e...

9 years ago | 0

Answered
Fitting differential equation (ode45) to data using lsqcurvefit
Most probably, the solution of your differential equation T becomes greater than 1. This will turn (1-T)^v(2) into a complex num...

9 years ago | 0

Answered
Error ode must return column vector
Add the line diffeq = zeros(4,1); at the beginning of your function "ode". Best wishes Torsten.

9 years ago | 0

| accepted

Answered
calculation variable x besselj
http://www.wolframalpha.com/input/?i=Solve%5Bx*J1(x)%2FJ0(x)+%3D%3D+5,x,Reals%5D and put the mouse over the red points in the...

9 years ago | 0

Answered
I am using the pdepe function and my question is how I could fix the following error: 'This DAE appears to be of index greater than 1'.
pl and ql are not allowed to be both zero. Best wishes Torsten.

9 years ago | 0

Answered
Fleet assignment problem, find the minimum of a sum.
x_i = 1, y_i = 0 if a_i < b_i x_i = 0, y_i = 1 if a_i >= b_i ? Best wishes Torsten.

9 years ago | 1

Answered
How to generate uniformly distributed weights between intervals that sum to one?
Take this code https://de.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum and reject the 3-tup...

9 years ago | 1

Answered
How to solve a (numerical) function g = F(c) for c?
g_target = ...; fun = @(c) F(c)-g_target; c0 = ...; csol = fsolve(fun,c0); Best wishes Torsten.

9 years ago | 0

Answered
Regarding the livelink COMSOL
Write the MATLAB results to a file and import that file into COMSOL (e.g. as an interpolation function). No LIVELINK needed. ...

9 years ago | 0

Answered
how to implement p&o
<https://de.mathworks.com/matlabcentral/fileexchange/39641-perturb-and-observe--p-o--algorithm-for-pv-mppt> Best wishes To...

9 years ago | 0

Answered
How can I create the student t distribution with nu=8, mu=0 and sigma^2=0.1?
By prescribing nu=8, mu=0 and sigma^2=nu/(nu-2) are already fixed. You can't prescribe them separately. Best wishes Torste...

9 years ago | 0

Answered
How to use wrapTo2Pi in user defined function which will be solved by ode45?
You solve |dx(2)/dt = wrapTo2Pi(a*x(1))|, not |x(2)-wrapTo2Pi(a*x(1))=0|. So of course, x(2) can become larger than 2*pi. Bes...

9 years ago | 0

| accepted

Answered
how to find the molar volume with redlich kwong equation
The Redlich-Kwong equation is a polynomial equation in the molar volume. So use MATLAB's "roots" to solve. Best wishes ...

9 years ago | 0

Answered
How can I write a sysmbolic function inside ODE45 function?
If you define your ODE equations in a function, you can use multiple commands to do so. Take a look at the third or fourth e...

9 years ago | 0

Answered
How to generate uniform random points with in a circle.
http://mathworld.wolfram.com/DiskPointPicking.html Best wishes Torsten.

9 years ago | 1

| accepted

Answered
2nd order numerical differential equation system solving
function main y0=[0; 5; 1; 1; 1; 4; 1; 1; 2; 3; 1; 1]; t0=0; tfinal=10; [T Y] = ode45(@odesNew,[t0 tfinal],y0) ...

9 years ago | 1

| accepted

Answered
Failure in initial objective function evaluation. FMINCON cannot continue. error in fmincon line(536)
I suspect there is an argument for the log-function which is negative or undefined. Best wishes Torsten.

9 years ago | 0

Answered
Solving equations using solve() function
sol = solve([a+b==0,a+b+c==0,a+b+c+d==0,a==0],[a b c d]); sol.a sol.b sol.c sol.d Best wishes Torsten.

9 years ago | 0

| accepted

Answered
How can I solve a system of equations for each element in a vector?
rho = 1000; D = 8e-3; h = 28e-3; mass = (1e-3):(1e-3):(500e-3); g = 9.81; V2 = sqrt(mass*g/(pi/4*D^2*rho)); ...

9 years ago | 0

| accepted

Answered
Random Numbers generation from pareto distibution and generalized exponential distrbution
n = 100; x = rand(n,1); y_ge = mu-log(1-x.^(1/alpha))/lambda; y_p = lambda*(1-x).^(-1/alpha); generates 100 random...

9 years ago | 0

| accepted

Answered
pdepe fails to discretize set of parabolic differential equations
pdepe solves systems of elliptic-parabolic partial differential equations, not mixtures of partial and ordinary differential equ...

9 years ago | 0

Answered
MATLAB code for Lambert W function
https://blogs.mathworks.com/cleve/2013/09/02/the-lambert-w-function/#c1ea75cb-227b-4aec-959b-6d5b66c07d54 Best wishes Tors...

9 years ago | 1

Answered
I have a coupled second order DE; how to solve them with boundary conditions; How to get get F1 and F2
Use "bvp4c" with the "multipoint boundary value problem" facility: https://de.mathworks.com/help/matlab/ref/bvp4c.html#bt5u...

9 years ago | 0

Answered
How can I minimize the difference between data from PDE script and experimental data set?
Here is an example for parameter fitting in an ODE: https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and...

9 years ago | 0

Answered
Using MATLAB's pdepe to solve coupled elliptic and parabolic PDEs?
Rewrite the first two equations as d/dx (D_n*dn/dx) - mu_n*(dn/dx*dpsi/dx + n*q/eps*(n-p)) = dn/dt d/dx (D_p*dp/dx) + mu...

9 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals error.
j is not given a value ; so what do you expect EtaVal(j) or LamVal(j) to be ? Furthermore, EtaVal and LamVal are scalars - so...

9 years ago | 0

Answered
Problems with ode23s
It's hard to tell why ode23s fails for your problem. Some options how to proceed: 1. Make sure that you transposed the dX-...

9 years ago | 2

Answered
How do I solve a second order non linear differential equation using matlab.
According to MATHEMATICA, the analytical solution is z(x) = log(cosh(sqrt(A*B)*x))/A Best wishes Torsten.

9 years ago | 0

Answered
How do i solve this boundary value ode?
Take a look at the example *"Compute Fourth Eigenvalue of Mathieu’s Equation"* under *https://de.mathworks.com/help/mat...

9 years ago | 0

| accepted

Load more