Community Profile

photo

Torsten


2,415 total contributions since 2013

Contact

Torsten's Badges

  • Ace
  • 24 Month Streak
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
Calculating mean for each column
mean ( R ) ?

10 hours ago | 0

| accepted

Answered
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...

11 hours ago | 0

| accepted

Answered
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 ...

6 days ago | 0

| accepted

Answered
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...

6 days ago | 0

Answered
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. ...

6 days ago | 0

Answered
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. ...

7 days ago | 0

| accepted

Answered
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...

7 days ago | 0

| accepted

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

7 days ago | 0

| accepted

Answered
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...

8 days ago | 0

Answered
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 ...

8 days ago | 1

| accepted

Answered
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 ...

8 days ago | 0

| accepted

Answered
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')

9 days ago | 1

| accepted

Answered
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)

13 days ago | 0

Answered
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 - ...

13 days ago | 0

Answered
Matlab code of this equation
Use "pdepe" to solve the system u_t = u_xx + v v_t = u_xx Best wishes Torsten.

13 days ago | 0

Answered
How is "feasibility" defined in fmincon?
https://de.mathworks.com/matlabcentral/answers/77808-understanding-output-of-fmincon-optimization-using-sqp-algorithm

13 days ago | 0

Answered
How to solve an equation, with infinite solutions, to find only n number of solutions?
fun = @(x)cos(x)*cosh(x)-1; Interval = zeros(4,2); Interval(1,:) = [3/2*pi, 3/2*pi+0.5]; Interval(2,:) = [5/2*pi, 5/2...

13 days ago | 0

| accepted

Answered
Unbound Shear Layer boundary condition problem
function main xlow = -1; xhigh = 1; A = 1; solinit = bvpinit(linspace(xlow,xhigh,4000),[1,1],1); sol = bvp4c(@bvp4o...

14 days ago | 2

| accepted

Answered
What wrong in line 12 ?? help me please (Index exceeds matrix dimensions.)
clear close all; N = 10; h = 0.5; u1(1) = 2 ; u2(1) = 3 ; u3(1) = 0 ; t = 0:h:N*h; for n = 1:N u3(n+1) = u1(n)+h*u2(...

15 days ago | 0

Answered
Plotting the solution of multi-variable non-linear equations (solved using fsolve).
function main G = linspace(250,750).'; X0 = [1,1,1,1]; for i=1:numel(G) sol = fsolve(@(X)ptfunc(X,G(i)),X0); ...

15 days ago | 0

| accepted

Answered
Problems with integral in fsolve
function main z_0 = [0.5,3,4]; options = optimset('TolFun',1e-8,'TolX',1e-8); sol = fminsearch(@fun,z_0,options) end ...

15 days ago | 0

Answered
How to take input from a function file in optimization toolbox objective?
x = fmincon(@objective,x0,A,b) function f = objective(x) % Calculate phi and lambda from x f = -phi*inv(lambda)*phi'; end

16 days ago | 0

| accepted

Answered
Generalized extreme value distribution Parameter Estimation
https://de.mathworks.com/help/stats/gevfit.html

16 days ago | 0

Answered
Unable to find explicit solution
The message says that your differential equation is too complicated to get an explicit expression as solution. Try a numerical ...

16 days ago | 0

Answered
Failure in initial user-supplied objective function evaluation
Try abc = @fun1; x0 = [0,0]; f = abc(x0); and see what is returned in f.

16 days ago | 0

Answered
Using ode45 for transient analysis
First possibility: Use the end time of integration big enough such that the water temperature surely exceeds the one you prescr...

16 days ago | 2

| accepted

Answered
Why is the output of my function infinity?
Since your function tends to 0 as x -> 0 by L'Hospital, you can integrate y = cos((pi*cos(x))/2).^2.*csc(x).*(x > 0);

16 days ago | 0

Answered
Probability of at least 1 even number using while loop
Maybe of interest for checking the result of the Monte Carlo simulation: P(rolling at least one even number with 3 dice) = 1- ...

16 days ago | 0

Answered
How to find a corresponding matrix value
[M I] = min(t); y(I)

20 days ago | 0

| accepted

Answered
Multiple linear equality constraints in fmincon
Aeq = [1 0 1 0 ; 0 1 0 1 ; 1 1 0 0 ; 0 0 1 1]; beq = [sum of column 1 ; sum of column 2 ; sum of row 1 ; sum of row 2] X = [X1...

20 days ago | 1

| accepted

Load more