Community Profile # Torsten

Last seen: Today Active since 2013

Professional Interests:

#### Statistics

• • • • • #### Content Feed

View by

applying iterative solutions with Fsolve in multiple variables equations.
f = @(x,y,k) [busdata(2,2)-...; busdata(3,2)-...; busdata(3,3)-...]; F = @(p)f(p(1),p(2),p(3)); ...

etwa 11 Stunden ago | 0

| accepted

How can I continue my Leapfrog / midpoint two- step method code ?
h=0.01; t=0:h:1; n=numel(t); mu = 20; f_m = @(t,y) mu*(y-cos(t))-sin(t); exact = @(t) exp(mu*t)+cos(t); %initials% y_m(1)...

etwa 16 Stunden ago | 0

I don't know where my code is wrong
If x = r, y = theta and z = z, the volume of the cylinder below the plane 2x - y + 2z = 2 down to zmin can be calculate...

etwa 17 Stunden ago | 0

need help with gauss elimination
There are thousands of MATLAB codes for Gaussian elimination in the internet. If you are not able or willing to program it on y...

2 Tage ago | 0

problem = createOptimProblem('lsqcurvefit','x0',g,'objective',@(p,xdata)fun2(p,xdata,IC,eps,V,De,Nz,dz,Cw,Jw),... ...

4 Tage ago | 1

| accepted

How to calculate and plot this function f(z) =\frac{1}{2}[\frac{(z^3)-(0.5+0.8660i)}{z^4-(0.5-0.8660i)z^3}]
f = @(x,y) 0.5./(x+1i*y).^3.*((x+1i*y).^3-exp(1i*pi/3))./((x+1i*y)-exp(-1i*pi/3)); r = 0.2:0.01:0.9; phi = 0:0.01:2*pi; [R,PH...

4 Tage ago | 0

| accepted

Equation is convergent but unable to extract the output
The real part of y seems to converge, the imaginary part doesn't. k=360; h=0.562; theta=35; alpha_m = @(m)((-1)*36...

4 Tage ago | 0

| accepted

Check for incorrect argument data type or missing argument in call to function "minimize"
There is no valid call to "minimize" with 9 arguments as you do above. The first argument must be a function handle - it's not...

4 Tage ago | 0

Maintaining a number generated through randomization
Try rng('default') as the first line of your code.

5 Tage 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...

5 Tage 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...

5 Tage 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...

5 Tage 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...

5 Tage 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

5 Tage 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)...

5 Tage ago | 0

| accepted

С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

5 Tage 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...

5 Tage 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(...

6 Tage 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....

6 Tage 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)...

6 Tage 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...

6 Tage 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. ...

6 Tage 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

6 Tage 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...

7 Tage 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 + ...

7 Tage 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,:)

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

7 Tage 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 =...

7 Tage ago | 0

| accepted