Answered
The collocation scheme used by bvp4c is the fourth order Lobatto IIIa Runge-Kutta formula or Simpson????
From the documentation: bvp4c is a finite difference code that implements the three-stage Lobatto IIIa formula. This is a collo...

7 years ago | 0

Answered
How to get only one or two output times from ODE solver?
If you use two elements in tspan, ode15s returns the solution at intermediate output times chosen from its internal stepsize con...

7 years ago | 0

| accepted

Answered
Shooting Method On Harmonic Equation
function main ydot0_start = 1.0; a = 2.4; iflag = 0; sol = fzero(@(x)fun_shooting(x,a,iflag),ydot0_start); iflag ...

7 years ago | 1

| accepted

Answered
Parameter estimation in ODE45.
Why do you think the number of unknowns and the number of equations do not match ? You have 4 equations in 4 unknowns. (Of cours...

7 years ago | 0

| accepted

Answered
Could anyone help to combine three matrix into single matrix.
A_combined = [A1(:,1),A2(:,1),A3(:,1)];

7 years ago | 0

Answered
Solving Multiple First Order Differential Equations for Constants
Replace the time derivatives by difference quotients. Then you get a linear system of equations A*[k1;k2;k3;k4;k5;k6] = b wh...

7 years ago | 1

| accepted

Answered
Evaluating a complex integral
format long fun = @(t,x,y) exp(-t.^4 + 1i.*y.*t - x.*t.^2 + 1i*pi*0.125); P = @(x,y) integral(@(t)fun(t,x*exp(-1i*pi*0.25)...

7 years ago | 0

| accepted

Answered
Is it possibile to use fsolve(fun,x0) giving input to fun?
fun = @(x)root2d(x,a,b,c,d,e,f)

7 years ago | 1

| accepted

Answered
Summation with FOR loop question
format long fak = 1.0; s = fak; for i = 1:1600 fak = fak/i; s = s + fak; end s exp(1)

7 years ago | 1

Answered
How to make polynom with unknown coefficients?
n = 10; c = sym('c', [1 n]); p = poly2sym(c)

7 years ago | 0

| accepted

Answered
How to solve a complex equation which has one equation but two real variables?
Does that help ? >> syms z k >> z0 = 1+3*1I; >> a = solve(z==k*z0,z) a = (sym) k*(1 + 3*I) >> real(a) ans = (sym) re(k) - ...

7 years ago | 0

Answered
Double or higher order integration by numerical method
Divide the y-interval of integration into subintervals ystart = y1 < y2 < y3 < ... < yn = yend and call your function "traorl"...

7 years ago | 1

Answered
Symsum and sum output different result
Try n = 1:10000; lamda = n*pi/a; pih = ((lamda+h/k1)-(lamda-h/k1).*exp(-2*lamda*t1))./((lamda+h/k1)+(lamda-h/k1).*exp(-2*lamd...

7 years ago | 0

Answered
How to iterate until convergence?
The structure of your code should look like: function main V = linspace(0.01,0.25,1000); R = zeros(numel(V),1); R0 =...

7 years ago | 0

| accepted

Answered
How to add limit condition to existing code
If you are not satisfied with the approximation for h=0.01 in the code, you could evaluate the function fgl_deriv for two or thr...

7 years ago | 0

| accepted

Answered
How to solve a Partial Differential Ecuation?
The code at the end of the link solves a single equation. MATLAB does not have the ability to symbolically solve PDEs. If you w...

7 years ago | 0

| accepted

Answered
Plotting implicit equation with fimplicit
function main fimplicit (@(x,y)f(x,y)) end function fun = f(x,y) n = 8; a1 = 1.0086*y - 0.9216*(x - y); b1 = 1.0107*(...

7 years ago | 0

| accepted

Answered
What are the boundary conditions of interp1 function?
MATLAB uses a "not-a-knot" end condition for splines.

7 years ago | 1

Answered
How can numerically compute eigenvalues of an ordinary differential equation in MATLAB?
https://www.wolframalpha.com/input/?i=y''(x)%2B1%2Fx*y'(x)%2Ba*(1-x%5E2)*y(x)%3D0,+y'(0)%3D0 So you are left with the problem t...

7 years ago | 0

Answered
How to solve a Partial Differential Ecuation?
Here is code to start from: https://de.mathworks.com/matlabcentral/answers/440015-first-order-partial-differential-equations-sy...

7 years ago | 0

Answered
Calculate derivative of erfcx(x) function
Try x = 0:0.1:5; analytical_derivative = -2/sqrt(pi) + 2.*x.*erfcx(x); numerical_derivative = (erfcx(x+1.0e-6)-erfcx(x))*1e6;...

7 years ago | 0

| accepted

Answered
Taking the second derivative
second_der = zeros(size(V_preamp)); second_der(2:end-1) = ((V_preamp(3:end)-V_preamp(2:end-1))./... (M(...

7 years ago | 2

| accepted

Answered
Beam Equation - problem with boundary condition
v = vx = 0 at x=L w = wx = 0 at x=0 ?

7 years ago | 0

Answered
Extrapolate best-fit line
If you have the coefficients c(1) and c(2) of the fit line l(x)=c(1)+c(2)*x, just evaluate the equation at the x-coordinate of t...

7 years ago | 0

| accepted

Answered
How to plot a function of two variable
https://de.mathworks.com/help/matlab/ref/surf.html

7 years ago | 0

Answered
solving non linear differential equations
a = -0.2; b = 0.1; c = 0.1; epsilon = 1.0; fun = @(t,y)(t*y*(y-a)*(y-b)+c)/epsilon; tspan = [0 3.5]; y0 = 0; [T,Y] = ode4...

7 years ago | 0

| accepted

Answered
How to find the differential equation ? ode solver
If the output plot function is f(t) and f(t0)=f0, then the corresponding ODE reads dy/dt = f'(t) with y(t0) = f0. This ODE sh...

7 years ago | 1

| accepted

Answered
ODE45 error message "Error using exist The first input to exist must be a string scalar or character vector"
param = fminsearch(@lau,param0) [t,w] = ode45(@grinding,[t0 tp],w0)

7 years ago | 1

| accepted

Answered
Fsolve for a generalizable number of equations.
A = [1, 0, 0, 0, 1/sub(1,1), 1/sub(2,1), 0, 0;... 0, 1, 0, 0, 1/sub(1,2), 1/sub(2,2), 1/sub(3,2), 0;... 0, 0, 1, 0, ...

7 years ago | 0

| accepted

Answered
two-step Adams Moulton method
In the Adams-Moulton formula, y(i) appears on both sides of the equation. This means that the Adams-Moulton method is implicit. ...

7 years ago | 0

Load more