Answered
How to solve first-order Taylor series expansion of two variable in MATLAB ?
https://de.mathworks.com/matlabcentral/answers/92764-how-do-i-generate-the-taylor-series-as-a-function-of-several-variables-in-m...

7 years ago | 0

| accepted

Answered
How to evaluate a point in a solved differential equation in matlab?
y16 = interp1(xx,yy,1.6)

7 years ago | 1

Answered
singular jacobian encountered with bvp4c : constant-dependant result
function dydx = diffeq(x,y) % the function vector is as follows : y = [g; dg/dx; f; df/dx; h; dh/dx] dydx=ones(length(y),1); ...

7 years ago | 0

Answered
Finding the multiple zeros within a prescribed interval
deltax = 1e-4; xright = 100; n = floor(xright/pi); fun = @(x)tan(x)-x; for i=1:n left = (2*i-1)*pi/2.0 + deltax; right...

7 years ago | 1

Answered
Solution of mincon doesn't satisfy the nonlcon constraints
function main x0 = [1,1] A = [0 1] b = [40] lb = [0 0] ub = [10000 10000] [x,fval] = fmincon(@objfun,x0,A,b,[]...

7 years ago | 0

| accepted

Answered
Stuck on rewriting program to use nested if constructs
if x>=0 if y>=0 ...; else ...; end else if y>=0 ...; else .....

7 years ago | 0

Answered
How to implement tightly coupled nonlinear odes using ode45 in matlab?
Solve the equations t*x2 - x1*x2' = t^2*x1 + x2*x1' x1'' + x2'' = t*x2 - x1*x2' Setting y1 = x1 y2 = x1' ...

7 years ago | 1

| accepted

Answered
Calculate the integral in time of a variable that's being integrated with ODE15s
Add the equation d(tau)/dt = R^4 with tau(0) = 0 Then tau is available during integration. Best wishes To...

7 years ago | 1

| accepted

Answered
Warning: Cannot find explicit solution
format long deltax = 1e-13; n = 100; ke = 3.7e-5; R = 2e-4; Dm = 12.6e-19; fun = @(x)x.*cot(x)-1+ke*R/Dm; ...

7 years ago | 0

Answered
ode45 say that return column vector using lsqcurvefit
function FF = BF(velocity1, a, dk1) n = 1; t_int = (0:0.0006:5.3994)'; velocity1_int = velocity1'; [xa] = ode4...

7 years ago | 0

| accepted

Answered
I am having trouble writing a ODE45 function for this bungee jumping problem.
Take a look at the ballode example: https://www.mathworks.com/examples/matlab/mw/matlab-ex84325677-simple-event-location-a-bo...

7 years ago | 0

Answered
ode23: using different sets of ODE equations at certain time intervals t
Take a look at the answer given here: https://de.mathworks.com/matlabcentral/answers/429332-using-ode45-to-solve-quarter-mode...

7 years ago | 0

Answered
Using ODE45 to solve quarter model of suspension with input function (an endless obstacle)
t = 0:0.01:0.25; phase = 1; y0 = [0 0 0 0]; [t1, y1] = ode45(@(t,y) fce(t,y,phase),t,y0); t = 0.25:0.01:3; ph...

7 years ago | 0

Answered
Parameter fitting problem: I use lsqnonlin to fit 3 parameters into a system of ODES and everything works fine until I inserted a Confidence Interval as one of my coefficients.At that point the fitted parameter vector took only the initial guess
Each time your ODE function is called, "rand" takes a different value between 0 and 1. This makes it impossible for the ODE solv...

7 years ago | 0

| accepted

Answered
Minimize non linear function with undefined vector
The examples given here should show you how to proceed: https://de.mathworks.com/help/matlab/ref/fminsearch.html

7 years ago | 0

| accepted

Answered
How we can solve the symbolic integral of the given function
Your integral equals b^(a+1)*(c/b*gamma(a)*gammainc(c/b,a)-gamma(a+1)*gammainc(c/b,a+1)) Best wishes Torsten.

7 years ago | 0

Answered
How to fit a custom probability distribution to my data?
Since the integral from 0 to Inf must be equal to 1, it follows that a = b = lambda. This is the usual exponential distribution ...

7 years ago | 1

| accepted

Answered
Solving linear convection equation (wave equation) by Lax Wendroff Scheme
N=100; %No. of grid points Tmax=1; % time period=1 alpha=1; %given h=0.01; %given value of delX delt=0.005; ...

7 years ago | 2

| accepted

Answered
How to stop the ODE45 at a defined condition during its execution ?
If you want a controlled shutdown, use the event function capability of the ODE solvers.

7 years ago | 2

Answered
How to insert square terms in constraints for fmincon
You must use function "nonlcon" for this.

7 years ago | 0

| accepted

Answered
I'm trying to solve a fourth order ordinary differential equation using the bvp4c function. However, I am getting a few errors in my code.
function main options = bvpset('stats','off', 'RelTol', 1e-6); solinit = bvpinit(linspace(0,1,500),[1,0,0,0,0,0]); ...

7 years ago | 1

| accepted

Answered
Display the indices of constraints, which are satisfied with equality (Linprog)
idx = find(A*x==b)

7 years ago | 0

| accepted

Answered
Non linear constraint for optimization
function [c,ceq] = mycon(x) c= x(1)^2 - x(2); ceq = []; end

7 years ago | 0

| accepted

Answered
error in nonlinear system
Why is your Jacobian (3x1) and not (3x3) ? And replace y = -feval(J,xold)\ feval(f,xold); by y = -J(xold)\fu...

7 years ago | 0

Answered
Using ode15i
Nothing oscillating can be seen: https://www.wolframalpha.com/input/?i=Runge-Kutta+method,+dy%2Fdx+%3D+Sqrt(2-0.5*y(x)%5E4),+...

7 years ago | 0

Answered
how can I solve this partial derivatives
Use pdepe. Best wishes Torsten.

7 years ago | 0

| accepted

Answered
how to write matlab bvp4c code for moving boundary surface problem?
function main r=[0 0.02 0.04] for i=1:numel(r) r_actual = r(i); solinit = bvpinit(linspace(0,10,10000),[...

7 years ago | 2

Answered
Why is my data is incorrect after looping?
You must set the initial condition for u and v not only for u(1,1) and v(1,1), but for u(1,1:4) and v(1,1:4). And change *all* u...

7 years ago | 0

| accepted

Answered
how to interpolate?
Bi=0:0.001:14.5; Ai=interp1(B,A,Bi)

7 years ago | 0

| accepted

Load more