Answered
how can i solve this differential equation through MATLAB?
Use one of the integrators from MATLAB's ODE suite, e.g. ODE45. Best wishes Torsten.

8 years ago | 0

Answered
Curvefitting a given function with parameters to pass through given points
Each prescribed point on the curve gives you a relation between the parameters to be estimated. These relations are constraints ...

8 years ago | 0

Answered
How to format the nonlinear equations to find solutions?
function ncf = N(x) %ncf = 0.5*(1+erf(x/sqrt(2))); xr = real(x); xi = imag(x); if abs(xi)>1e-10 error...

8 years ago | 0

| accepted

Answered
Optimizing functions involving higher dimensions?
Check out https://de.mathworks.com/products/optimization.html Usually, providing the gradient in MATLAB codes from the Op...

8 years ago | 0

Answered
call large equation to ode solver
function dy = shebhestatici1(t,y) X1=y(1,1); X2=y(2,1); X3=y(3,1); X4=y(4,1); X5=y(5,1); ...

8 years ago | 0

| accepted

Answered
How can I solve cdfs of the general extreme value distribution for x?
Solve the equation eqn2 = delta_quer such that it reads 1 - eqn1 = expression of delta_quer, alph and u The...

8 years ago | 0

| accepted

Answered
why is there a big difference between trapz and mean
See what happens: function main A=[2 5; 3 6]; m11 = mean(A,1) m12 = mean(m11) m21 = trapz(A,1) m22 = trapz(m...

8 years ago | 0

Answered
generate random lognormal?
https://de.mathworks.com/help/stats/lognrnd.html Best wishes Torsten.

8 years ago | 0

Answered
How can i correct the function below?
Shouldn't it be function a = accelerate(F1,F2,m) F = F1 + F2; a = norm(F)/m; end ? Best wishes Torste...

8 years ago | 0

Answered
How do I solve for a value in a non-linear equation?
0.0001^2 must be added, not subtracted. Best wishes Torsten.

8 years ago | 0

Answered
lsqnonlin: units of functions
Say you have two functions given as f1 = 3000*x - 20 f2 = 3*x - 0.03 and you use lsqnonlin to determine x. What do...

8 years ago | 0

| accepted

Answered
Error in the Solution of a Linear Matrix Equation
If b is not in image(A), MATLAB finds x such that ||A*x-b||_2 is minimized (at least if you determined x as x=A\b) Best wishe...

8 years ago | 0

Answered
Finding roots of system of multivariable equations from initial conditions and with variables within a certain domain
Guessing that f and g are nonlinear in Vb and phi, use MATLAB's "lsqnonlin". Best wishes Torsten.

8 years ago | 0

Answered
How can i avoid this error: 'Index exceeds array bounds.' in my code?
function dydt= rf(~,y) Best wishes Torsten.

8 years ago | 0

| accepted

Answered
How do I use the upwind scheme on an Advection pde with three variables:x, y, and t?
Note that U*grad(rho) = u(x,y,t)*drho/dx + v(x,y,t)*drho/dy Now depending on u and v, discretize drho/dx and drho/dy acc...

8 years ago | 0

Answered
How do I use a for loop in my ode15s based code for shooting method and get multiple graphs?
function shooting_method clc;clf;clear; global lambda gama Pr Rd Lew Nb Nt Mn gama=1; Mn=6; Rd=0.1; Pr=10;...

8 years ago | 2

Answered
How to optimise a definite integral?
R = @(theta) k0*exp(k1*sin(k(1)*theta + phi)); theta_dot = @(theta) sqrt(mu./R(theta).^3./(k1*k(1)^2*sin(k(1)*theta + phi) ...

8 years ago | 0

Answered
fun applied to a loop
Use % T=totalflow(x0,N); instead of T=totalflow(x0,N); Best wishes Torsten.

8 years ago | 0

Answered
Combining results of two implicit function solutions
For a given k0, use interp1 to interpolate kx(k0) and ky(k0). Then kz(k0)=k0^2-(kx(k0))^2-(ky(k0))^2. For the interpolation, ...

8 years ago | 1

| accepted

Answered
how solve x on x+sin(x+y)=y
y=-4:0.1:4; for i=1:numel(y) y_actual=y(i); x(i)=fzero(@(x)x+sin(x+y_actual)-y_actual,1); end plot(x,y) ...

8 years ago | 0

Answered
Query regarding solving differential equation
The example ODE with Time-Dependent Terms under https://de.mathworks.com/help/matlab/ref/ode45.html shows how to...

8 years ago | 0

Answered
System of PDEs which is tricky for PDEPE
You could try to use "pdepe" with the third equation differentiated: (epsilon*E)_xx=-b*c_x with Dirichlet boundary condi...

8 years ago | 0

Answered
System of PDEs which is tricky for PDEPE
"pdepe" is designed to solve systems of parabolic-elliptic pdes. Your third pde is hyperbolic in nature. Thus "pdepe" is not sui...

8 years ago | 0

Answered
Help : In an assignment A(:) = B, the number of elements in A and B must be the same.
In the second iteration, a and b are empty arrays since i=48001 and sig1(48001:48000)=sig2(48001:48000)=[]. Best wishes To...

8 years ago | 0

| accepted

Answered
Non linear boundary value problem with infinity.How to solve?
Use dz/dx = dz/dt / dx/dt and the initial condition z(0.39047)=0.26333 to solve your system from above. The condition at x=infin...

8 years ago | 1

Answered
How to normalize unit vector in ode45?
function main w = [0;0;1]; % rotates around z axis, with angular velocity 1 rad/s i0 = [1/2;1/2;1/sqrt(2)]; % initial un...

8 years ago | 0

| accepted

Answered
Error when function returns a vector of length 51, but the length of initial conditions vector is 3.
Take a look at the example "ODE with Time-Dependent Terms" under https://de.mathworks.com/help/matlab/ref/ode45.html ...

8 years ago | 0

Answered
Is there any way to use multiple tolerances in ODE solvers?
AbsTol can be a vector of the same size as the solution vector. Thus you can prescribe absolute tolerances for each solution com...

8 years ago | 0

Answered
nlinfit() not evaluating my power-law function
x = 960:1236 y = Lbolos(261:537) model = @(beta, s)( beta(1)*s.^(beta(2)) ) initial = [Lbolos(261)/(960^(-4)) ; -4] ...

8 years ago | 0

| accepted

Answered
How to solve this equation by regression
y = y(:); x = x(:); z = z(:); M = [ones(numel(x),1) x z]; b = y; sol = M\b; A = sol(1) B = sol(2) C = ...

8 years ago | 0

Load more