Answered
Solving system of non-linear equations
ad 1) Use fsolve. ad 2) Use different initial guesses for x1, x2, ... . Best wishes Torsten.

11 years ago | 0

Answered
How can you maximize area of a rectangle given a total perimeter?
max_area = 0.0; for k=1:7 a=k; b=15-k; area = a*b; if area > max_area a_max = a; b_...

11 years ago | 1

Answered
Inverse/opposite of diff function?
x(1:end-1,:) + x(2:end,:) Best wishes Torsten.

11 years ago | 0

| accepted

Answered
How to use ODE45 to solve a second order system of equations?
It's the derivative of y (y(2)) which is identically 4. If you only want to plot y, use plot(x,y(:,1)); Best wishes...

11 years ago | 0

Answered
Sum up row values
p_ny = sum(p(row-4:row)); Best wishes Torsten.

11 years ago | 0

| accepted

Answered
how to solve an equation of the form ax=b
If you have 1024 equations for 1023 variables, the system can in general not be solved exactly. What you get by typing x...

11 years ago | 1

Answered
I need some help on this optimization problem.
min: I4_cost*d s.c. I4_FE*d >= 10 d binary (0 or 1) To determine d, use http://de.mathworks.com/help/optim/ug/intl...

11 years ago | 1

| accepted

Answered
I need some help on this optimization problem.
min(I4_cost(I4_FE>=10)); Best wishes Torsten.

11 years ago | 1

Answered
Sum of all the prime numbers under 100, sum of the ten smallest prime numbers.
Oh come on ... summe = 0; nprime = 0; for i = 2:100 istprime = 1; for j = 2:i-1 if mod(i,j)==0 ...

11 years ago | 1

| accepted

Answered
Sum of all the prime numbers under 100, sum of the ten smallest prime numbers.
summe = 0; for i = 2:100 istprime = 1; for j = 2:i-1 if mod(i,j)==0 istprime = 0; break;...

11 years ago | 0

Answered
How get the maximal positive root of polynomial?
Add res = max(res) in your code from above. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Find mininmum value across the column
From the documentation: _M = min(A,[],dim) returns the smallest elements along dimension dim. For example, if A is a matrix, ...

11 years ago | 0

| accepted

Answered
Area calculation of a fitted gaussian curve
http://integrals.wolfram.com/index.jsp?expr=a1*exp%28-%28%28x-b1%29%2Fc1%29%5E2%29+%2B+a2*exp%28-%28%28x-b2%29%2Fc2%29%5E2%29&ra...

11 years ago | 0

| accepted

Answered
Solving a system of coupled PDE's
pdepe can not be used to solve the attached system of PDEs. You will have to discretize your equations in space and solve the...

11 years ago | 0

Answered
How to divide a matrix by a number
r=0.1:0.1:10; E=1./(r.^3); Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Solving simultaneous ODEs using ode45
Try this: function main % Defining constants a=5.9e5; % J/(min^0.5dCm^1.5) b=0.5; Cp=4187; % J/kgdC rho=1000...

11 years ago | 0

| accepted

Answered
Constraining to specific values during an optimisation
http://de.mathworks.com/help/optim/ug/intlinprog.html Best wishes Torsten.

11 years ago | 0

Answered
how to solve linear equation containing inverse of the matrix using backslash.
I guess that backslash won't help here, but of course you can write z=K1\(K2'*x)+K3\(K4'*xr)-K5\(K6'*phi)-K7\F' Best wis...

11 years ago | 0

Answered
How to Invert functions with same input variables?
a=...; b=...; c=...; d=...; e=...; f=...; g=...; h=...; i=...; y=...; fun=@(x) a*x(1)+b*x(2)+c*x...

11 years ago | 0

| accepted

Answered
How to use extra time varying discrete inputs in Ode45?
function main Qu=[0 0 0 0 0 0 0 0 21 41 60 75]; [t,Ts]=ode45(@(t,Ts)temp(t,Ts,Qu),(1:1:12),45) function dTdt=tem...

11 years ago | 1

| accepted

Answered
Error using bvp4c (singular jacobian encountered)
Use sol = bvp4c(@(x,y)ex111ode(x,y,n),@ex111bc,solinit,options); as call to bvp4c. If the problem persists, look wheth...

11 years ago | 0

Answered
solve a system of ode by bvp4c
I mean that the function F1 from above is given by F1(W,U,U',V,V') = (c1*a2-c2*a1)/(b1*a2-b2*a1) and the function F2 fro...

11 years ago | 0

Answered
TroubleShoot FMinSearch with subscript assignment mismatch
A scalar must be returned to fminsearch from "objective" ; you return a vector. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
solve a system of ode by bvp4c
Solve your equations for W', U'' and V''. Let y(1) = W, y(2) = U, Y(3) = U', Y(4) = V, Y(5) = V'. Your system then re...

11 years ago | 0

| accepted

Answered
lngamma, complex argument
Use http://www.mathworks.com/matlabcentral/fileexchange/3572-gamma and apply "log" to the result. Best wishes Torste...

11 years ago | 0

Answered
Minimisation of simultaneous complex constrained equations
Split everything into real and imaginary part and use lsqcurvefit or lsqnonlin to solve for a and b. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Regarding the PDF and CDF of two gamma distributed random varaibles!!
The density function for X+Y is given by f_X+Y(z)=exp(-q*z)*p^(2*m)/(gamma(m))^2*integral_{x=0}^{x=z}(x*(z-x))^(m-1)*exp(-(...

11 years ago | 0

| accepted

Answered
How can I solve these recursive equations ?
xn = a*(1-b^n)/(1-b) + b^n*x0. Now insert n=743. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
k distinct combinations of size p without replacement
Look at the second block of code under http://stackoverflow.com/questions/8157554/randomly-select-subset-of-all-possible-comb...

11 years ago | 0

Load more