Answered
I need help, How to solve bvp4c error?
1. You pass a handle called "courant" to bvp4c, but you supply the derivatives in a function called "stream". 2. If you want ...

12 years ago | 0

Answered
PDEPE for simple coupled ODE-PDE system?
I guess the behaviour stems from the discontinuity of u1 at x=5. Try du1 = -0.07*u1 instead of if (x >5) du1 = ...

12 years ago | 1

| accepted

Answered
Discretization of FVM 1D particle model, heat transport
I don't understand your problem. At the center, u_(-1/2)=u_(1/2). At the outer boundary, (u_(N+1/2)-u_(N-1/2))/deltar is a...

12 years ago | 0

Answered
Solve a coupled pair of non-linear differential delay equations?
Adding your equations gives p'(t)+q'(t)=0, so p(t)=-q(t)+constant Inserting in the second equation gives q'(t)=(...

12 years ago | 0

| accepted

Answered
How to solve pde and ode together?
Use the method of lines to transform your PDE into a system of ODEs and use an ODE integrator to solve the complete system (ODEs...

12 years ago | 0

Answered
how can fix this problem of interp1 line 184
Looks that you provide arrays to interp1 for interpolation that are empty or only contain one element. Best wishes Torsten...

12 years ago | 0

Answered
Cos^2 fit for Malus Law.
xdata = ... [7.6 17.6 27.6 37.6 47.6 57.6 67.6 77.6 87.6 97.6 107.6 117.6 127.6 137.6 147.6 157.6 167.6 177.6 187.6 197.6 207....

12 years ago | 0

Answered
How to solve second order partial differential equations ?
This is a multilayer problem with internal heat sources. As far as I know, there is no ready-to-use pdetool to solve this kin...

12 years ago | 0

Answered
How do you solve a nonlinear ODE with Matlab using the finite difference approach?
All you have to do is replace b = 2 - g*dt*dt/L; by b=2; and write the new recurrence as xn(i+1) = b*xn(i)/a + d...

12 years ago | 0

| accepted

Answered
Could anyone help me with this warning please?
The analytical solution for your ODE is given by p(t)=20*exp(t)/(exp(t)*(cos(t)-sin(t))-201) This function has a singular...

12 years ago | 0

| accepted

Answered
Solve equations and get "t"
z = 17267.895; a = -14.62; b = -6.19; c = -9.11; d = -6.72; e = -9.19; f = -12.23; g = -7.93; h ...

12 years ago | 0

Answered
Line approximation from 5 points in Matlab
x = [365.672 ; 526.974 ; 593.972 ; 660.972 ; 819.974]; y = [249.996 ; 250.001 ; 250.005 ; 250.007 ; 250.0089]; A =[1 x(1);...

12 years ago | 0

Answered
How can take an integral for a dependent expression?
I get 2*x*Polylog(2,exp(x))-2*Polylog(3,exp(x))-x^3/3+x^2*log(1-exp(x)) for the integral of x^2/(exp(x)-1) Take a lo...

12 years ago | 0

Answered
Problem too many input arguments
Maybe you have to replace [t,U] = ode45(@(t,U) ekvationssystem_ode(t,U,C),[0 tslut],[xstart ystart xprimstart yprimstart]'); ...

12 years ago | 0

Answered
how to generate normal gaussian distribution using randraw funtion?
http://de.mathworks.com/help/matlab/ref/randn.html Best wishes Torsten.

12 years ago | 0

Answered
How to solve a system of equations with a constraint?
Instead of w and phi, use w.^2 and phi^2 in your system. This ensures that the unknowns are nonnegative. Best wishes To...

12 years ago | 1

| accepted

Answered
Solve sixth-order ODE in matlab
Use - depending on your boundary conditions - ODE45 or BVP4c and set up the system as y1'=y2 y2'=y3 y3'=y4 y4'=y5 ...

12 years ago | 0

| accepted

Answered
complex numbers and Nan's as output using 'fsolve'
Replace your function by function F=productivity3(x) global a b tau A F=[x(1)+x(2)-1; ...

12 years ago | 0

| accepted

Answered
Could anyone help me with tolerances erroe that I got when I am trying to implement an integration please??
There is no problem solving the ODE dp/dt = N0*sin(omega*t)*p*(1-p/k) using ODE45, I guess. You can easily check this b...

12 years ago | 0

Answered
How do I force real solutions using linsolve(B,x) or mldivide(B,x).
Use imagA = linsolve(imagB, imagx) % (6) instead of imagA = linsolve(imagB; imagx) % (6) Best wishes Torsten.

12 years ago | 2

Answered
Generate random numbers from a non-parametric PDF
If X~N(mu1,sigma1) and Y~N(mu2,sigma2) and X and Y are independent, then X+Y~N(mu1+mu2,sigma1+sigma2). Thus the PDF of the s...

12 years ago | 0

Answered
How to limit the solution of an ode?
Add the algebraic equation y-(diameter-level(t))=0 and apply the non-negative option to the unknown y. Best wishes ...

12 years ago | 1

| accepted

Answered
How to make sure that fsolve gives only positive values as the solution
Square your unknowns in the functions you supply to fsolve. E.g. if you want to solve x(1)-5=0, solve instead y(1)^...

12 years ago | 2

| accepted

Answered
fitting implicit non-linear equation
Use lsqnonlin with f(i) defined as f(i) = a*b*ln(X4(i))-(W1*X2(i)*(1-X1(i))+W2*X3*(1-X1(i))-W3*X2(i)*X3(i)+W4*X2(i)*X3(i)*(1-...

12 years ago | 1

Answered
I have a sine function y = a*sin(bx-c)+d and I have 4 points on the function: P1(0.840,0.730) P2(1.516,0.594) P3(2.879,0.236) P4(3.365,0.652)?
I get a=-0.386091187 b=-2.36473575 c=-0.96663067 d=0.401059696 Of course, since sin(x)=sin(x+2*Pi), the constant ...

12 years ago | 1

| accepted

Answered
I have a sine function y = a*sin(bx+c)+d and I have 4 points on the function: P1(0.835,0.720) P2(1.498,0.589) P3(2.866,0.236) P4(3.299,0.649)?
Use MATLAB's fsolve: a=-0.416512038 b=-2.44492318 c=1.06244590 d=0.374304977 Best wishes Torsten.

12 years ago | 0

Answered
Find the inverse of a system of two polynomials
You may try MATLAB's 'solve' command. If this does not work, insert numerical values for the coefficients and use fsolve. ...

12 years ago | 0

Answered
How to use ode23s to solve heat equation
If you are still interested in a solution for your problem: Choose u(x)=1/eps*max(1-abs(x/eps),0) for eps=0.001, e.g. a...

12 years ago | 0

| accepted

Answered
fsolve in a for loop
f = @(t) 760 - ((a*exp(-log(a+.5912*exp(-11.7755/(1.987*t))*b)+b*(.5912*exp(-11.7755/(1.987*t))/... (a+.5912*exp(-11.7755...

12 years ago | 0

| accepted

Answered
Optimization in the presence of symbolic parameters
Something like syms A x f(x)=A*tanh(x)-x^2; solve(diff(f)==0,x); ? Best wishes Torsten.

12 years ago | 0

| accepted

Load more