Answered
find a cubic polynomial p(x)=a+bx+cx2+dx3
p(x1) = a+b*x1+c*x1^2+d*x1^3 = y1 p(x2) = a+b*x2+c*x2^2+d*x2^3 = y2 p(x3) = a+b*x3+c*x3^2+d*x3^3 = y3 p(x4) = a+b*x4+...

8 years ago | 1

Answered
Monte carlo simulations- vary one parameter at a time or all of them at once?
All parameters are varied simultaneously according to their underlying statistical distribution.

8 years ago | 0

| accepted

Answered
How to perform an interpolation for Cartesian coordinates?
Let's say TIME,X,Y,Z are your measurements at a distance of 5 sec for TIME. Let's build a new time vector TIME_REQUEST...

8 years ago | 0

| accepted

Answered
how to solve a second order differential equation using Euler's method?
If you define F=@(y,x)[y(2);2*y(1)+8*x*(9-x)] you can work with the code from above. Best wishes Torsten.

8 years ago | 0

| accepted

Answered
How do i find the first and second derivative of the cubic spline at x = 0
https://de.mathworks.com/matlabcentral/fileexchange/24996-spline-derivative Best wishes Torsten.

8 years ago | 0

Answered
How do I use Eulers Explicit method to solve a system of first-order ODEs
This should help: % function definition F=@(t,u)[u(2); u(3); u(4); -6*u(1)-u(2)+7*u(3)+u(4)]; % initial values U(...

8 years ago | 0

Answered
how can I solve two equations with two unknown variable using matlab?
http://www.wolframalpha.com/input/?i=Solve%5B%5B-x*(x1-x)%2B(r-y)*(y1-y)%3D0+%26+(x1-x)%5E2%2B(y1-y)%5E2-z%5E2%3D0%5D,%5Bx,y%5D%...

8 years ago | 1

Answered
Mathematics behind the normc function?
You divide all components of the vector (v1,v2,v3,...,vn) by sqrt(v1^2+v2^2+v3^2+...+vn^2). Best wishes Torsten.

8 years ago | 0

| accepted

Answered
Can't Plot These Two ODE's On Same Plot
t0 = 0; y0 = 2; v0 = 0; Y0 = [y0;v0]; tf = 12; deltat = 0.1; tspan=t0:deltat:tf; ... [t,Y] = ode45(@(t,y)f(t,y,param),ts...

8 years ago | 0

| accepted

Answered
Solving of coupled differential equation with different differential coefficient
Use ODE15S to solve the first two equations. Within the function routine of ODE15S, given rho1, use a Forward-Euler method to...

8 years ago | 0

Answered
how to evaluate a double integral using the trapezoidal rule equation?
You don't need to program the trapezoidal rule in two dimensions. Just call the trapezoidal rule in one dimension twice. In ...

8 years ago | 0

| accepted

Answered
how to find f"(0) where f=y(1),f'=y(2),f"=y(3)
f0 = deval(sol,0); f0(3) Best wishes Torsten.

8 years ago | 1

| accepted

Answered
solve 3rd order nonlinear ODE as U''' + UU' = 0 with B.C. U(0) = 1, U(1) = 0 and U'(0) = 0; I tried ode45 but, it didnt work.
Use MATLAB's bvp4c in the range [0,1]. Best wishes Torsten.

8 years ago | 0

Answered
could anyone help me to fix the issue.
iwant = -Inf; % Initialization of iwant iwant = max(iwant,cell2mat(o_th(:))); % update of iwant in iteration loop ...

8 years ago | 0

Answered
How to plot general solution of a trigonometric function???
Derive b as a function of a, prescribe a range for a, calculate b and use "plot(a,b)". Best wishes Torsten.

8 years ago | 0

Answered
How can I solve an equation in a While loop?
Maybe m1, m2, m3, m4, c1, c2 are NaN ? And use D = [m1 m2 ; m3 m4] \ [c1 ; c2]; d1 = D(1); d2 = D(2); And alwa...

8 years ago | 0

Answered
How to use fsolve
eqn5 = @(x)x^2+1; solution = fsolve(eqn5, startx); Best wishes Torsten.

8 years ago | 0

Answered
Roots of five degree equation with variable coefficients
In general, there is no analytical formula for the roots of polynomials of degree > 4. You will have to assign values to x and y...

8 years ago | 0

Answered
restricting values of solution when solving for CDFs with fsolve
If you substitute y = cos^2(x) and evaluate your equations with the y-vector, you will get a solution vector which is between 0 ...

8 years ago | 0

Answered
Trial and error problem
Condition 1 and Condition 2 hide two equations that must be fulfilled to accept eps1 and gamma1 as solutions. So you have two eq...

8 years ago | 0

Answered
random matrix with constraints:
I did not test it, but this code at least promises to do the job: https://de.mathworks.com/matlabcentral/fileexchange/36070-gen...

8 years ago | 0

| accepted

Answered
How to solve Simultaneous Quadratic Equations?
For the first equation, substitute y = tan(x) and solve the quadratic equation in y. For the second equation, substitute z = ...

8 years ago | 0

Answered
Heaviside function in ODE
1. Set isterminal=1 in the event function and organize your code as in the "ballode" example. 2. Switch a variable "flag" in ...

8 years ago | 0

| accepted

Answered
How can I give initial condition as given in following equation?
Take a look at the section "Solve Differential Equation with Condition" under https://de.mathworks.com/help/symbolic/ds...

8 years ago | 0

Answered
Error: Inner Matrix dimensions must agree
dk(:) is (22x1), dA is (22x22). Thus the multiplication dk(:)*...dA in h0=... is not defined. Best wishes Torsten.

8 years ago | 0

Answered
t1 range is 0.1 to 2 and t2 range is 0.1 to 2.....and t1+t2 should not be greater than 2
Generate a pair of random numbers in the range [0.1:2]. Accept the pair if their sum is less or equal 2. Repeat until you ...

8 years ago | 0

Answered
Duhamel's Integral in MATLAB
udotdot_g=@(x)...; h=@(x)...; u=@(t)-integral(@(tau)udotdot_g(tau).*h(t-tau),0,t); Best wishes Torsten.

8 years ago | 0

Answered
Can I solve equations backward in time? (Pontryagin maximum principle optimal control problem)
All MATLAB ODE-solvers can integrate backward in time. Just specify "tspan=[T 0]". Best wishes Torsten.

8 years ago | 2

| accepted

Answered
Creating a random permutation that always start with a specific value
N=[1 1+randperm(9)]; Best wishes Torsten.

8 years ago | 0

Load more