Answered
primal-dual interior- point methods for linear problems
Use "linprog" with objective function min: 0'*x.

7 years ago | 0

| accepted

Answered
How to write a function to calculate ODE?
Solve the ODE using Euler's method, e.g., and - instead of returning the solution N - return r*N.

7 years ago | 0

Answered
how to find the shortest distance between two lines in R3 ?
% Line 1 is given as x=x0+lambda*(x1-x0) x0 = ...; x1 = ...; % Line 2 is given as y=y0+eta*(y1-y0) y0 = ...; y1 = ...; ...

7 years ago | 0

Answered
MINIMIZE A FUNCTION WITH CONSTRAINTS
Put the constraints on y and yy in "nonlcon".

7 years ago | 0

Answered
Linear optimization with sums in the objective function
Do you know how to define f if the objective is min: x11*p1 + x12*p1 + x13*p1 + x21*p2 + x22*p2 + x23*p2 ? Define (y1,y2,y3,...

7 years ago | 0

Answered
How to find five unknown parameters of an equation
Use one of MATLAB's fitting tools, e.g. lsqcurvefit. Best wishes Torsten.

7 years ago | 0

Answered
can someone help me ? , something error in my code
f = 200*x./(x+5).*exp(-2*x/30)

7 years ago | 0

| accepted

Answered
How to use fminsearch or fmincon for a multivariable integral function?
[x,fval,exitflag,output] = fminsearch(@(x)F(x(1),x(2)),x0,options);

7 years ago | 2

| accepted

Answered
Sum of the random array cannot reach the upper limit sum
Just copy the answer I gave correctly: randomArray = lb + rand(1,31).*(ub-lb);

7 years ago | 0

Answered
How to random an array of data with upper and lower limits
data = lb + rand(1,32). * ( ub - lb );

7 years ago | 0

| accepted

Answered
Solving System of ODE that includes Algebraic Eqn's
function main y0 = [2; 1; 0; 400]; tspan = [0 10]; Fao = 3.3; Cao = 0.01983; K = 1.6; [t,y] = ode15s(@(t,y)fun...

7 years ago | 2

| accepted

Answered
How to multiply a vector with each column of a matrix
A = [1 4 7 10; 2 5 8 11; 3 6 9 12]; b = [1;2;3;4]; C = bsxfun(@times,A,b.')

7 years ago | 0

| accepted

Answered
Solve the general solution of a Differential equation with boundary conditions
Tell the program which gave you the general solution to additionally incorporate the six boundary conditions.

7 years ago | 0

| accepted

Answered
Numerical solution to an ODE as input to solve another ODE?
Solve dy/dt (= dy/dx * dx/dt) = g(y,x)*f(y,x) dx/dt = f(y,x) together using ODE45.

7 years ago | 1

| accepted

Answered
Error Plotting a Multi-variable Function with Respect to a Single Variable.
x = 0:2*pi/100:2*pi; for i=1:numel(x) y(i) = actomic_form_factor(1, 0, 0, 1, 0, 0, 10000, x(i)); end plot(x,y)

7 years ago | 1

| accepted

Answered
How to calculate the maximum distance between two functions
x = fminbnd(@(x)-(sin(x)-cos(x))^2,0,4*pi) distance = abs(sin(x)-cos(x))

7 years ago | 0

Answered
ode45 keeps saying that my function must return a column vector
I think you mean function main Cars_in = [0 0 0 0 0 4 10 12 8 15 25 53 56 48 24 22 32 18 12 0 0 0 0]; Cars_out = [0 0 0 0 0 ...

7 years ago | 0

| accepted

Answered
Fitting data to integral2 function
x0 = [0.23,5.5,10.5]; th0 = ...; x = lsqcurvefit(@(x,xdata)fun(x,xdata,th0),x0,xdata,ydata) function res = fun(x,xdata,th0)...

7 years ago | 0

Answered
How can I solve this trigonometric equation?
Yes, theta = 2*pi*n where n is any integer. And I guess that theta = acos ( (9 * tan^2(beta) - 1) / (9 * tan^2(beta) + 1...

7 years ago | 0

Answered
tranlsate a matriciel expression in matlab language
R = w.'*C + Rm*w.'*beta; S = w.'*Sigma*w; eqn3 = sum(w)-1.0;

7 years ago | 1

Answered
Differential Equations using eulers method
Yes, you need a loop: n = [5 10 100 1000]; for i=1:numel(n) n_actual = n(i); deltat = 30/n_actual; y(i,1) = 3.0; ...

7 years ago | 0

Answered
Numerically solving an integral with multiple variables.
f = @(u,x)sqrt(u)./(1+exp(u-x)); F = @(x)integral(@(u)f(u,x),0,Inf,'ArrayValued',true); F([2 4])

7 years ago | 1

Answered
multi degree of freedom system with ode45
[t,z] = ode45(@f,ts,z0);

7 years ago | 0

Answered
I want to solve an equation which is complex in nature as well as complex in structure. I wrote a simple code which is not working. I have no idea how to solve that equation. I am attaching the code that i wrote and equation image
eps1=1.5^2; eps2=-13+0.53*1I; eps3=2.25+0*1I; lambda=0.633e-6; k0=2*pi/lambda; a=1/k0; t=1/k0; p1=@(epse)k0*sqrt(epse-e...

7 years ago | 0

| accepted

Answered
How to solve a system of trigonometric equations?
E1^2 + E2^2 + (E3-l1)^2 - l2^2 - l3^2 = 2*l2*l3*cos(theta3) Can you take it from here ?

7 years ago | 2

| accepted

Answered
Can anyone help me with my ode?
[time,n] = ode15s(@volterra_allelo,[0 20],[1.2658e+04/2; 6.3095e+03/2]);

7 years ago | 0

| accepted

Answered
How to solve a partial derivative equation in MATLAB?
Use "pdepe". Best wishes Torsten.

7 years ago | 0

Answered
2nd order ode using euler method
function main xinit = 0; xfinal = 3; yinit = [1 0]; h = .5; [x,y] = euler_explicit(@dpnon,xinit,yinit,xfinal,h) ...

7 years ago | 2

| accepted

Answered
Solving nonlinear advection diffusion equation with pdepe
function [x,h] = Transient(); %% Initialization theta = 50; % degrees - angle of repose of material n = 8; % r.p.m. - rot...

7 years ago | 0

| accepted

Answered
Newton method to find polinom roots?
p = [ 1 -1 -6 0] x0 = 2; n = length(p); pd = polyder(p) result = []; for i = 1:8 fx = polyval(p,x0); ...

7 years ago | 1

| accepted

Load more