Answered
Least squares where C*x is always greater than d
x = lsqlin(C,d,-C,-d) Best wishes Torsten.

9 years ago | 1

| accepted

Answered
Drawing random values of N for given z and p in a binomial process
https://de.mathworks.com/help/stats/nbinrnd.html Best wishes Torsten.

9 years ago | 0

| accepted

Answered
multi Exponential regression method
If you use f=fit(x,y,exp2) f is automatically shown after execution. Best wishes Torsten.

9 years ago | 0

Answered
Newton's method for equation without analytical solution and integral without anti-derivative
x_(n+1)=x_(n)-h(x_(n))/h'(x_(n)) with h'(x_(n))=d*f'(x_(n))+int((diff(g,x))(x_(n),y),y,a,b) Best wishes Torsten...

9 years ago | 0

Answered
What method does pdepe use to solve PDE's
See the reference for pdepe: Skeel, R. D. and M. Berzins, "A Method for the Spatial Discretization of Parabolic Equations in ...

9 years ago | 1

Answered
please, can anyone tell me the solution of this differential equation in matlab "D2y + 4Dy + 3*y = exp^(2*x)"
syms y(x) eqn = diff(y,x,2)+4*diff(y,x)+3*y==exp(2*x); ySol(x) = dsolve(eqn) Best wishes Torsten.

9 years ago | 0

Answered
Calculating derivative of a function
syms a b x y = (3*x^2*sin(a*x))/(x^2+b); dy = diff(y,x) Best wishes Torsten.

9 years ago | 1

Answered
Write a function called triangle_wave
Use (-1)^k instead of (-1^k). Best wishes Torsten.

9 years ago | 1

Answered
Curve fitting with more than 2 variables
Use lsqnonlin with the f(i) defined as f(i) = y(i) - (1-(exp(-((x3(i)*a)*(x2(i)*b)/(x3(i)*a)+(x2(i)*b))*(1/x1(i))*(1-Cr(i))...

9 years ago | 0

| accepted

Answered
No explicit solution using "solve"
Plot the function and see whether it behaves as expected. Then try "fzero" to solve for Z. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Gradient function with multiple variables?
https://de.mathworks.com/help/symbolic/gradient.html The first example should show you how to set up your code. Best wishe...

9 years ago | 0

Answered
Numerical solution for a 2nd order ode
Rewrite your ODE as y1'=y2 y2'=-0.2*y2+y1+y1^3+0.3*cos(w*t) and use ODE45 to solve. Look at the examples provided ...

9 years ago | 0

Answered
How can I solve a 2nd order differential equation for a mass-spring system with IC's=0?
The initial conditions in Boyce/DiPrima are given by y(0)=0, y'(0)=1. https://debian.fmi.uni-sofia.bg/~horozov/Differentia...

9 years ago | 0

| accepted

Answered
Optimization problem with integer variables
Let x(i,j,l) (1<=i,j<=n, 1<=l<=k) a binary variable which is 1 if the element at position (i,j) equals l, 0 else. Then the co...

9 years ago | 0

| accepted

Answered
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN ODE15s
Start with consistent initial conditions, i.e. the algebraic equations should be satisfied at t=0. If necessary, use "fsolve" to...

9 years ago | 1

Answered
Solve a system of Partial Differential Equations using function BVP4C
rhs=[y(2);y(3);-3*y(1)*y(3)+2*y(2)*y(2)-y(4)+109.963*y(6);y(5);-3*5.076*y(1)*y(5)-0.0000007738*y(5)*y(7)-0.000002255*y(5)*y(5)...

9 years ago | 1

| accepted

Answered
How do I use nlinfit to solve for constants in multiple ordinary differential equations (multiple sets of time dependent data)?
Star Strider's contribution can serve as a guideline: https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and...

9 years ago | 0

Answered
Error on dsolve() line 201. Solving system of differential equations.
Try function main z0=[0; 1; 325]; tspan = [0 2500]; [T Z]=ode15s(@myfun,tspan,z0); plot(T,Z(:,1),'-o',T,Z(:,2),...

9 years ago | 0

| accepted

Answered
How to solve simultaneous comlpex equations?
You could try "vpasolve" instead of "solve". Or switch from symbolic to numeric and use "fsolve". Best wishes Torsten. ...

9 years ago | 0

Answered
How can i fix this error ? Failure in initial user-supplied objective function evaluation. FMINUNC cannot continue.
f=@(x)(1 + (x(1) + x(2) + 1).^2.*(19 - 14*x(1) + 3*x(1).^2 - 14*x(2) + 6*x(1).*x(2) + 3*x(2).^2)).*... (30 + (2*x(1) - 3*...

9 years ago | 0

| accepted

Answered
Using fzero function to solve a nonlinear equation with one input
Sure. function [alpha] = getalphach [A] = geom(); [n, m, Z] = setglblch(); [X,al] = setmartvar(); for i=1:numel...

9 years ago | 1

Answered
Influence of the constraints on the vector x
x=0 is the global minimum of your objective. Since x=0 satisfies the constraints in both cases, the solution remains the same...

9 years ago | 1

Answered
4D integral with exponential value
Brute-force method: delta=0.01; w=0:delta:1; z=0:delta:1; x=0:delta:1; y=0:delta:1; func=@(x,y,w,z)1/(1+16...

9 years ago | 0

Answered
Help on using ode45
You divide by x(3) - so it's not allowed to be zero at the beginning. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Result of integral is also integral problem
The integral is too complicated to be solved analytically. After setting w and z use integral2 for a numerial solution. B...

9 years ago | 1

Answered
i am facing Warning: Cannot find explicit solution
Seems your function f is to complicated for the "solve"-command to be successful. Remove the "syms" command, assign values to...

9 years ago | 0

Answered
Laplace Equation with pdepe command
Setting s=1, the solution is of the form u(x)=-1/2*x^2+a*x+b. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Trying to solve for the extreme points and maximum value for a function using linprog when the optimum solution is not unique?
No, you will always get only one solution. Best wishes Torsten.

9 years ago | 0

Answered
Using fzero function to solve a nonlinear equation with one input
Does this work ? function [alpha] = getalphach [A] = geom(); [n, m, Z] = setglblch(); X = setX(); al = setal();...

9 years ago | 1

Answered
How to plot the calculation made in ODE function solver ?
function xdot=MYCODE_FUN(t,x,K1,Ktr,Kr,Kp,Fe,Minitial,Winitial,dVdT) I = x(1); A = x(2,1); M = x(3,1); V=( (53*Minitial...

9 years ago | 1

| accepted

Load more