# Torsten

**Statistics**

**MATLAB Answers**

**0** Questions

**3.740** Answers

RANK**22**

of 262.707

REPUTATION**8.980**

CONTRIBUTIONS

**0** Questions

**3.740** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**1.013**

RANK

of 17.985

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 113.698

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**

finite difference method evaluation

As you can see from the two equations you wrote down, each equation gives two new unknowns. Thus in the end, you have N equatio...

ongeveer 7 uur ago | 0

Infinite sum with Bessel's function

n = 60; sstep = 1; a_k = J0ROOTS(n,sstep); r = (0:0.01:1).'; t = 0:0.1:1; S = zeros(numel(r),numel(t)); for i = 1:numel(t)...

ongeveer 15 uur ago | 1

| accepted

Use matlab to write code to calculate fluid dynamic problem

https://www.engineersedge.com/fluid_flow/pressure_drop/pressure_drop.htm

ongeveer 15 uur ago | 0

"Index in position 2 exceeds array bounds (must not exceed 1)"

P, E and K are (4x1) arrays. In the loop assignment L(m,t) = P(m,t)+E(m,t)-E(m,t-1)+K(m,t)-K(m,t-1); you treat the arrays as ...

1 dag ago | 0

| accepted

Solve system for Roots of Bessel Function

This is a very empirical code for your problem. Success is not guaranteed in all cases. T = 10; B = 1; K = 0.5; fun = @(a,b)...

1 dag ago | 0

| accepted

Computing temperature of a fluid inside a cylinder using PDEPE

Therefore, it can be considered that , Tdot = -2*h*(T-Tw)/(rho*cp*R0) where T is the the fluid temperature inside the cylinder a...

1 dag ago | 0

How to get the time step used in PDEPE solver?

pdepe uses ode15s as solver for the arising differential equations. This solver uses adaptive time stepping - thus if the probl...

1 dag ago | 1

How to calculate an exact solution: non-linear equation with multiple variables

Use "eig", not "fsolve".

1 dag ago | 0

Solve system for Roots of Bessel Function

I don't know how the (an,bn) for your problem are enumerated, but maybe it's a start. At least I can assure you that you will n...

2 dagen ago | 1

fractional derivative of Ln(x) ?

% Sample log between 1 and 4 h = 0.01; t = 1:h:4; y = log(t); % Compute fractional derivatives with different orders orde...

2 dagen ago | 1

| accepted

Nonlinear constraint on optimization using ODE - system state involved

I guess you have a time vector for which you have your data vector of measurements "yexp" ? In nlincon, with these measurement ...

2 dagen ago | 1

| accepted

fmincon nonlinear inequality constraint

It is not guaranteed that the "test parameters" betas satisfy the constraints in each iteration of the optimization process. So...

3 dagen ago | 1

How to calculate dx/dt in Matlab

If your results from the theoretical equation for K_la and from the numerical formula don't correspond, it's indicating that the...

3 dagen ago | 0

Uniform Random Variable Generator

https://de.mathworks.com/help/stats/prob.normaldistribution.truncate.html

3 dagen ago | 0

| accepted

Hello helper, I'm trying to run this code (energy optimization), but i get an error message :Index in position 1 exceeds array bounds (must not exceed 1).

You use P, E, K, Em and Km as 2-dimensional arrays, but they are only scalar values. Thus all of your if-statements and referenc...

3 dagen ago | 0

| accepted

max value of a function

syms x func = exp(-(x - 1)^2) + exp(-(x + 2)^2); dfunc = diff(func,x); ddfunc = diff(dfunc,x); xc= double(vpasolve(dfunc==0,...

3 dagen ago | 1

Value of infinite integral is different

syms k S = k^3*(1+2.35*k^(2/3)); J = int(S,k) J1 = subs(J,k,Inf) J2 = subs(J,k,sym('1000000000000000000000000000000000000000...

4 dagen ago | 0

how to store the value of intersection points from fzero into a vector

Before using fzero or fsolve, you should check whether fun1 - fun2 really has a zero. To do this, uncomment the lines u=[0.01...

5 dagen ago | 0

| accepted

Is there a way to substitute a set of variables to become a new variable?

syms a b alpha_1 alpha_2 v1 v2 l P V k R alpha_1 = 2*v1/l; alpha_2 = 2*v2/l; R = P*a*b/(2*k); L1 = R*V^2*l*alpha_1*k; L2 = ...

5 dagen ago | 0

evaluating functions and plotting

Use "piecewise" if you want to work with symbolic variables and functions. Otherwise f = @(x)2*x.^2.*(x>0 &x<=1) + (x.^2+3).*(...

6 dagen ago | 0

| accepted

How to plot the solution?

syms L lags e = exp(sym(1)); k1 = 3; k_1 = 1; k2 = 2.5; k3 = 1; k_3 = 1; k4 = 2; k5 = 1; E1 = 1; E2 = 2; K1 = (k_1+k2...

7 dagen ago | 0

| accepted

How to find all possible 8x8 submatrices of a 13x8 matrix?

r = nchoosek(1:13,8); A = rand(13,8); for i = 1:size(r,1) B(:,:,i) = A(r(i,:),:); end size(B)

7 dagen ago | 1

| accepted

i need help in use of f solve

FF= @(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12)... [A4*sin(A10)/10;... A5*sin(A11)/10;... A6*sin(A12)/10;... 10^(1...

7 dagen ago | 0

Error using double (subs())

syms initial_R u = -100; alpha = 2; v = initial_R*exp((2*(1-alpha))/(2+(1-alpha)*u*initial_R)/(2-alpha*u*initial_R)^(alpha)^2...

8 dagen ago | 0

Hello, I need help with: Replace elements in Vector A with those of vector B of the same position, only if they meet a certain condition, otherwise replace by a zero. Thanks

I kept the values in A unchanged that are less or equal to Threshold. If you also want to replace them by 0, take David's answer...

8 dagen ago | 1

can I apply a for loop inside the function so that I can make my program short?

N = 5; ti = 0; tf = 10E-6; tspan = [ti tf]; [time,Y] = ode45(@(t,y)f(t,y,N),tspan,[1;1;1;1;1;1;1;1;1;1].*10E-6); function...

8 dagen ago | 0

| accepted

Grouping rows on the first column and obtain minimum value on second column

What do you mean by "group on the first column" ? A = [13 7 13 6 13 5 13 6 12 7 12 5]; A = sortrows(A...

9 dagen ago | 1

How to solve symbolic and trigonometric equations simultaneous, two unknowns

Your equation has several solution, as already demonstrated in a previous post. Here is one of them: syms alpha gamma %R d %...

9 dagen ago | 0

set Anonymous function through a series of matrix for "lsqcurvefit" or "lsqnonlin"

x0 = [0.3,0.4]; F = @(x,k) arrayfun(@(k)[2, 2, exp(k*x(1)), exp(k*x(2))] * [1; k; -1; -1],k) % same as above equation, but fro...

9 dagen ago | 0

| accepted