# Torsten

**Professional Interests:**

**Statistics**

**MATLAB Answers**

**0** Questions

**3.421** Answers

RANK**24**

of 257.847

REPUTATION**8.146**

CONTRIBUTIONS

**0** Questions

**3.421** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**946**

RANK

of 17.769

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 110.072

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Maintaining a number generated through randomization

Try rng('default') as the first line of your code.

circa 12 ore ago | 0

Help with matrix question

A=[16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1]; I = find(A>3 & A<10); [ro...

circa 14 ore ago | 0

| accepted

Left and right sides have a different number of elements?

"launch_angle" and thus "dv" are arrays. Thus the operation V(i + 1) = V(i) + dv; does not work at the three positions in yo...

circa 15 ore ago | 0

| accepted

For loop completing the wrong steps.

Level_Either_Side = [Level_Either_Side ; Sorted_Level(Position(1,p)-5:Position(1,p)+5,1)]; if 5 positions before and after e...

circa 17 ore ago | 1

| accepted

Linear regression returns NaN for one of five regressors

Adding columns 2,3,4 and 5 shows that the rank of the matrix [ones(size(x,1),1),x]; will be the same as the rank of x, namely...

circa 17 ore ago | 0

How can i convert array a= [1 0 -2] in a char b = '1 0 -2' ?

https://de.mathworks.com/help/matlab/ref/num2str.html

circa 20 ore ago | 0

Minimize difference between vectors by varying scalar

a = x_model\x minimizes norm(a*x_model - x) If you want to minimize the difference in another norm (e.g. max(abs(a*x_model-x)...

1 giorno ago | 0

Сonvert the coefficients of the Hermite polynomial into a function

https://de.mathworks.com/help/symbolic/poly2sym.html https://de.mathworks.com/help/symbolic/sym.int.html

1 giorno ago | 0

fitting 3 sets of data simultaneously using "lsqcurvefit"

Define T = [t1;t2;t3] and OR = [or1;or2;o3] and treat [T,OR] just like you treated [t1;or1],[t2;or2],[t3;or3] . Wha...

1 giorno ago | 1

"Could not find a feasible initial point" error in GA.

The sum of the upper bounds you prescribe for your variables x(1),...,x(5) is smaller than -a6. But you want to have x(1) + x(...

1 giorno ago | 0

Error solving bvp4c - Singular jacobian

Try this code following John's suggestion: %Constants hb = 6.626e-34/(2*pi); m = 9*1.660538921e-27; w0 = 2e6*2*pi; Cc = (1....

1 giorno ago | 0

| accepted

Function inside the function

r=@(s,z) sqrt((s+s0).^2+(z+z0).^2); Ds=@(s,z)(c0x+A1x.*erf((r(s,z)+a1x)./b1x)+A2x.*erf((r(s,z)+a2x)./b2x)+A3x.*erf((r(s,z)+a3x)...

2 giorni ago | 0

| accepted

Evaluating a function with Matlab

Then you have to program it as t = 10; f = sign(t-16.82).*abs((t-16.82)/5.604).^1.576 An expression x^a for x<0 is comple...

2 giorni ago | 1

How to Solve matrix symbolically?

It can solve for scalars - and since both expressions are linear in the matrices, the scalar and the matrix solution coincide. ...

2 giorni ago | 0

For loop to take the average of previous 10 elements and next 10 elements in an array in each step

https://de.mathworks.com/help/matlab/ref/movmean.html

2 giorni ago | 0

| accepted

How do I count how many times in a row a value occurs?

A = [1 2 4 3 1 1 1 1]; Au = unique(A); count = arrayfun(@(i)numel(find(A==Au(i))),1:numel(Au)) output = [Au;count].' Your qu...

3 giorni ago | 0

Zeros from Trapz integration

Maybe you mean something like L = 2; %thickness [m] TL = 300; %surface T [K] T0x0 = 340;%T0(x=0) T0x = @(x) -182.22.*x.^3 + ...

3 giorni ago | 0

Reveresing the order of columns in an array

A = [1 2; 3 4; 5 6; 7 8; 9 10; 11 12]; perm = [1 6 5 4 3 2]; A = A(perm,:)

3 giorni ago | 0

How to code a certain part of this equation?

for i = 1:m-1 xmhalf = x(i); xphalf = x(i+1); B_agg(i) = 0.0; for k=1:m for j=k:m if v...

3 giorni ago | 0

| accepted

Swaping two columns randomly picked

A = rand(25,5); i = randsample(5,2); v = A(:,i(1)); A(:,i(1)) = A(:,i(2)); A(:,i(2)) = v; or simply A = rand(25,5); i =...

3 giorni ago | 0

| accepted

Imposing Constraint in FMINCON optimization problem.

Aeq = [zeros(1,N_plies),ones(1,N_plies)]; beq = 1.0;

3 giorni ago | 2

How to fit power law distribution on data set?

plfit is not an official matlab code. You can download it here: https://github.com/jblocher/matlab-network-utilities/blob/mast...

3 giorni ago | 0

Raising a scalar to each element in a matrix

expm is incorrect, use exp. And you shouldn't divide by 0 - not for X and not for Y. x = linspace(1,50); y = linspace(1,50); ...

3 giorni ago | 0

Sinus plus straight lines plot

f = @(x) 2*sin((x+2)*pi/2).*(x>=-2).*(x<-1) + (-2*x).*(x>=-1).*(x<=0); x=-2:0.001:0; plot(x,f(x)) Can you add the next two cy...

3 giorni ago | 0

| accepted

Setting Initial Conditions for Genetic Algorithm

Here is a list of options (also for initial conditions) you can set for ga: https://de.mathworks.com/help/gads/ga.html#mw_4a8bf...

3 giorni ago | 0

possitive solution for set of three nonlinear eqations where t_1 t_2 and pi_2 are varaibles

Solve the first equation for t_i2. Solve the second equation for P_i2 and insert the expression for t_i2 from the first equatio...

3 giorni ago | 0

how to create an arc path from 3 points(x, y, z) in plane?

Determine the center of the circle: https://math.stackexchange.com/questions/1076177/3d-coordinates-of-circle-center-given-thre...

3 giorni ago | 0

| accepted

Ho to perform Monte Carlo Simulation with a factor and a vector.

data_TSS=readtable('turb_danuube_15min.csv'); % data TSS & time TSS=data_TSS(1:1:353665,2); time=data_TSS(1:1:353665,1); %% T...

4 giorni ago | 0

| accepted

A simple error minimization (optimization) problem

A = [C1,C2,C3]; b = L1+L2+L3; C = A\b; C1 = C(1) C2 = C(2) C3 = C(3)

4 giorni ago | 0

| accepted

while loop to count partail sum of series

sum_{i=1}^{i=N} 1/(i*(i+1)) = 1 - 1/(N+1) No need for such a difficult while construction with precision estimate.

4 giorni ago | 0