Answered
Minimization with discrete variable
xvec=[12.7 15.875 19.05 25.4 31.75 38.1 50.8 63.5]; yvec=[1.27 1.5875 2.54 3.175]; zvec=[0.05 0.1 0.15 0.2]; obj =[7....

11 years ago | 0

| accepted

Answered
constraint optimization with alternatives under specific conditions
Use this objective function for fmincon: function f = objective(vec,x,y,z) a=vec(1); b=vec(2); if 2*x*a-y*b-z...

11 years ago | 1

| accepted

Answered
Normalization of JacobiP function
a = 3.5; b = 7.2; fun=@(x) jacobiP(3, a, b, x).^2.*(1-x).^a.*(1+x).^b; value=integral(fun,-1,1); Best wishes To...

11 years ago | 0

| accepted

Answered
How to use disjoint constraints with intlinprog? Two variables can't have the same solution (x1-x2 != 0)
x_ij decision variable ; x_ij = 1 if person i enters room j, x_ij=0 else. For Mary and Joe and three rooms this means that th...

11 years ago | 1

| accepted

Answered
How to find a subset of a matrix that has minimum condition number?
Maybe of interest for you: http://mathoverflow.net/questions/104803/optimizing-the-condition-number http://www.cs.rpi.edu/...

11 years ago | 0

Answered
Fsolve for multiple coupled-equation?
If the 1000 equations are coupled, you will have to solve them all together. Otherwise you can solve them one by one in the l...

11 years ago | 0

Answered
How to define functon Unit sample sequence
function [x,n]=edinecenImpuls(n0,n1,n2) n=n1:n2; x=(n-n0)==0; Best wishes Torsten.

11 years ago | 0

| accepted

Answered
The mathematics behind modelling
function main to = 0; tf = 100; tspan = [to tf]; y0 = [5535002 50 50 0 0 0 0 ]; [t,S] = ode45(@de...

11 years ago | 1

Answered
problem with integral exponential
int_A=@(t) -0.99884288089923034958045305504472/0.000069357701673937357644134094059041*exp(-0.000069357701673937357644134094059...

11 years ago | 0

Answered
Sorting values from a time series into two new vectors depending on the day
Maybe weekdays = ts.data(daynumber>1 & daynumber<7); weekenddays = ts.data(daynumber=1 | daynumber=7); ? Best wish...

11 years ago | 0

| accepted

Answered
Runge Kutta 4 for slingshot simulation.
help ode45 Best wishes Torsten.

11 years ago | 0

Answered
Problem with the polylog
Use http://www.mathworks.com/matlabcentral/fileexchange/35008-generation-of-random-variates/content/lerch.m together with...

11 years ago | 0

Answered
Export changing variable with ode45 to solve system of equations in separate function file
Forget the time-loop and use interp1 in system3 instead: tStep = linspace(0,400,401); alpha = calculate_a1(); y0 ...

11 years ago | 0

| accepted

Answered
Error using * Inner matrix dimensions must agree.
mprop2=mpay2*(exp((1-f1).*DeltaV2/vex2 )-1)*(1-finert2)./(1-finert2*exp(DeltaV2/vex2 ) ); mprop1=mpay1*(exp(f1.*DeltaV1...

11 years ago | 0

Answered
I want to solve a second order differential equation for boundary value problem with Matlab. Can you help me?
Solution is y(x)=0 for all x in [0;10]. Best wishes Torsten.

11 years ago | 0

Answered
Solving PDE involving boundary condition with partial derivatives with respect to space and time.
In principle, your boundary condition for C is C|x=L = y*K_v together with an ordinary differential equation for y that ...

11 years ago | 1

| accepted

Answered
2nd Order Ordinary Differential Equation
If the drag is zero, the general solution is x(t) = x(0) + vx(0)*t + gx/2*t^2 y(t) = y(0) + vy(0)*t + gy/2*t^2 z(t) =...

11 years ago | 0

Answered
PDEPE for Reaction – Diffusion Model not Working?
You can't solve a mixed system of PDEs and ODEs using pdepe. The main problem is that the ODEs don't need boundary condition...

11 years ago | 0

Answered
double integral implementation in matlab
Note that x and theta are arrays, not scalars. This is in conflict with your summation. Supply the function to be integrated ...

11 years ago | 0

| accepted

Answered
how to generate uniform discrete distribution starts from zero?
A=unidrnd(2,5,5)-1; Best wishes Torsten.

11 years ago | 0

| accepted

Answered
errors in nonlinear regression
Use nlinfit and nlparci instead of "lsqnonlin": http://de.mathworks.com/help/stats/nlparci.html Best wishes Torsten.

11 years ago | 0

Answered
How to estimate model fitting parameters in matlab
If you have the optimization toolbox, use fmincon and additionally to the seven simultaneous equations add the constraints ...

11 years ago | 0

Answered
How can I solve system of nonlinear equations in Matlab?
Supply an initial guess: function main x0 = [0 0 0]; a=...; b=...; c=...; y=...; x=fsolve(@(x)fun(x,a,b,c...

11 years ago | 0

Answered
Solve ODE using backward euler's method
Initialize x_old = 43100, y_old = 0 and z_old = 0.0033 Compute x_new by solving the nonlinear system of equations ...

11 years ago | 1

| accepted

Answered
ode45 and switching differential equations
Use the "event" facility of the ODE solvers. Best wishes Torsten.

11 years ago | 0

Answered
How can i use matlab to integrate motion form a system of differential equations
http://de.mathworks.com/products/symbolic/code-examples.html?file=/products/demos/symbolictlbx/second_order_differential_equatio...

11 years ago | 0

Answered
How to write anonymous funtion to solve with lsqnonlin
function F = myfun(x) F(1) = f1(x); F(2) = f2(x); ... F(n) = fn(x); The constant L can be omitted since it does...

11 years ago | 0

| accepted

Answered
Simple for loop index
A=[2,4,6,7,9]; index=1; for n=[4,9] x(index)=find(n==A); index=index+1; end Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Spatial discretization has failed
You only set two (strange) boundary conditions instead of four required by the solver. What are your boundary conditions in m...

11 years ago | 0

Load more