Community Profile

# Torsten

2.428 total contributions since 2013

View details...

Contributions in
View by

Probability distribution of a multiple variable sum
Take samples from your empirical data and use Monte-Carlo-simulation to determine the above probability. This code should help ...

12 dagen ago | 1

| accepted

How can we provide minimum distance i.e. 20 between each random generated node?

13 dagen ago | 1

Optimization problem with a function of 2 parameters
TC = @(x) (QC(x(1))+FC(x(2))+ RC)/E(x(2)); lb = [1.5e-5,1000]; ub = [2.5e-5,100000]; sol = fmincon(TC,[2e-5,10000],[],[],[],[...

13 dagen ago | 0

| accepted

Solve a system of equations
x22 - w0 = x13 = x31 * x32 = x22 * x21 / (x22+k2*V2) * x22 = x22 * (x22/(x22+k1*V1)) / (x22+k2*V2) * x22 This gives a quad...

13 dagen ago | 0

| accepted

Can anyone help me in coding matlab code for Quadratically Constrained Quadratic Program (QCQP)?
function main H = [2 0 0;0 2 0;0 0 2]; f = [-1; -2 ;-3]; R = [7 0 0;0 7 0;0 0 7]; h = [-4 ;-5 ;-6]; c = 88; ...

13 dagen ago | 0

Solving 2nd order ODE with ODE45
M = matlabFunction(V,'vars', {'t','Y'})

15 dagen ago | 1

Solving two nonlinear equations
A = 0.5:0.01:2; alpha = 0.5; l00 = 1; for i = 1:numel(A) a = A(i); fun = @(l0) 1 + alpha*l0^(alpha-1) - l0 - alpha*a*(2...

16 dagen ago | 1

| accepted

How to plot a nonlinear equation using FSOLVE in MATLAB
K = 1:627; kp = 4500; h = 1.0e-3; d = 7.5e-3; ky0 = 1.0; Ky = zeros(numel(K),1); %fKy = zeros(numel(K),1); for i = 1:nume...

16 dagen ago | 0

function of integral bound
function main sol = fzero(@fun,1.0) end function res = fun(b) amin = 0; amax = b; xmin = 0; xmax = @(a) a+b...

20 dagen ago | 0

| accepted

How to redefine a variable inside the function?
Add the nonlinear constraint x(3) - x31*x32 = 0 in function "nonlcon". And remove the lines y33=x31*x32; x13=y33; % It shou...

22 dagen ago | 0

| accepted

A for loop need help ASAP
for i = 0:3:300 j = i/3 + 1; Fi(j)= atan(-(A5(1,1+i)/A5(1,2+i))); Theta(j) = acos(A5(1,3+i)); Psi(j)= atan(A3(1,3+i)...

23 dagen ago | 0

Solving system of ODE with dataset of variables

24 dagen ago | 1

| accepted

error in fmincon code
V0 = [1;2;4]; objective = @(V)[-s.',(l-q).']*V; But why do you shoot with canons on sparrows (means: why do you use a nonlinea...

28 dagen ago | 0

| accepted

How can i find the distance between every point in two different point-clouds
https://de.mathworks.com/help/stats/pdist2.html min (D) or min (D.') seems to be what you are looking for.

28 dagen ago | 1

Calculating mean for each column
mean ( R ) ?

29 dagen ago | 0

| accepted

complex solutions in ode23s
I guess there exist some operation in the calculation of your time derivatives that gives a complex result (e.g. sqrt of a negat...

29 dagen ago | 0

| accepted

Cannot get the right coefficient from PCHIP fit
From the documentation: Since the polynomial coefficients in coefs are local coefficients for each interval, you must subtract ...

ongeveer een maand ago | 0

| accepted

Could anyone help me to solve the issue.
If "initial_position" is an array with 5 elements and "common_position" is a scalar, you can simply type difference = common_po...

ongeveer een maand ago | 0

Fitting a straight line to a set of 3-D points
What I would do is find the average P¯of your points and an eigenvector V of the covariance matrix for its largest eigenvalue. ...

ongeveer een maand ago | 0

optimizing linprog 2 variables with different dimensions
Set V = [V(1) V(2) V(3)] = [z y(1) y(2)] as "combined" solution vector and write all your equations in V instead of z and y. ...

ongeveer een maand ago | 0

| accepted

fmincon or linprog use in minimization?
l = 0.25; q = 2; s = 1; A = 1; x = 20; d = 15; f= [-s, l-q]; Aeq = [1, A]; beq = x; lb = [0, 0]; ub = [Inf, d]; sol...

ongeveer een maand ago | 0

| accepted

how can I plot a summation correctly?
n = 10; k = 0:n; S = cumsum(1./(k.^2+1)); plot(k,S)

ongeveer een maand ago | 1

| accepted

Linear Programming With geq constraints
You will have to invert the signs of all the elements in A and b. And call linprog as xopt = linprog(z,A,b,[],[],lb) And I do...

ongeveer een maand ago | 0

Optimization of Plug Flow Reactor by Varying Temperature and Pressure
Although I guess that there are bounds on P and T, here is a code that will give you a start. In case you want to constrain P ...

ongeveer een maand ago | 1

| accepted

How to solve equation with elliptic integral for modulous?
Solve a_eq*sqrt(P1/B) = ellipticK(k1^2) - ellipticF(arcsin[ sin{(alpha + pi )/2}/k1],k1^2) for k1. Once you have k1, you can ...

ongeveer een maand ago | 0

| accepted

Using dde23 with events option
plot(sol.x,sol.y(1,:),'k') hold on plot(sol.x,sol.y(2,:),'b') hold on plot(sol.x,sol.y(3,:),'r')

ongeveer een maand ago | 1

| accepted

Using (x-a) ^ 2 + (y-b) ^ 2 = r ^ 2, the values ​​of a, b and r are known. How do I find x and y values?
theta = linspace(0,2*pi,100); x = a + r*cos(theta); y = b + r*sin(theta); plot(x,y)

ongeveer een maand ago | 0

How to solve unique positive root
d(1) = 0.95; e(1) = 0.65; interest = 0.05; y = 0.02; r = 0.37; alpha = ((interest - ...

ongeveer een maand ago | 0