Answered
How to define multi variable linear programming ??
Set Z0 = x4, Z1= x5, Z2 = x6. Can you solve the problem now ?

8 years ago | 0

Answered
Error using bvp4c: "Warning: Unable to meet the tolerance without using more than 5000 mesh points. The last mesh of 4921 points and the solution are available in the output argument."
If the code works for values of L0 smaller than 100, try approaching 100 by subsequently calling bvp4c with values L0start, L01,...

8 years ago | 0

Answered
How can i generate random numbers according to a known probability?
https://en.wikipedia.org/wiki/Inverse_transform_sampling

8 years ago | 0

Answered
Why is the fval value so large when I use fzero to solve a equation which has Elliptical integral?
[betaxx,fval]=fzero(f1,[pi/2+0.01,3*pi/2-0.01])

8 years ago | 0

| accepted

Answered
How can I work out the rate of change for my experimental data?
rate_of_change_of_altitude = diff(altitude)./diff(time)

8 years ago | 4

| accepted

Answered
Fit an Ordinary Differential Equation (ODE) using lsqcurvefit
Remove parameters x(1) and x(2) from your list and introduce one new variable x(12). From x(12), calculate x1=5*cos^2(x(12)) and...

8 years ago | 1

| accepted

Answered
Solving ODEs with different sets of initial conditions
function main n_times = 1000; t_i = 1; t_f = 10; tspan = [t_i,t_f]; y0 = randn(2, n_times); y0 = reshape(y0, 2*n_tim...

8 years ago | 1

| accepted

Answered
How do I output the second derivative from an ODE solver for further use?
After the line [t, r] = ode45('bubble', time_range, initial_conditions); insert for i=1:numel(t) t_actual = t(i); r_act...

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

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

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

8 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,[]...

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

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

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

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

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

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

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

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

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

8 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

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

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

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

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

8 years ago | 2

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

8 years ago | 0

| accepted

Load more