Community Profile

photo

Torsten


Last seen: Today Active since 2013

Statistics

  • 36 Month Streak
  • Ace
  • Revival Level 2
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

View by

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

alrededor de 3 horas ago | 0

| accepted

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

alrededor de 5 horas ago | 0

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

alrededor de 5 horas ago | 1

Answered
How to calculate an exact solution: non-linear equation with multiple variables
Use "eig", not "fsolve".

alrededor de 6 horas ago | 0

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

alrededor de 16 horas ago | 1

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

alrededor de 19 horas ago | 1

| accepted

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

alrededor de 19 horas ago | 1

| accepted

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

1 día ago | 1

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

1 día ago | 0

Answered
Uniform Random Variable Generator
https://de.mathworks.com/help/stats/prob.normaldistribution.truncate.html

2 días ago | 0

| accepted

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

2 días ago | 0

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

2 días ago | 1

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

2 días ago | 0

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

3 días ago | 0

| accepted

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

4 días ago | 0

Answered
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).*(...

5 días ago | 0

| accepted

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

5 días ago | 0

| accepted

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

6 días ago | 1

| accepted

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

6 días ago | 0

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

7 días ago | 0

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

7 días ago | 1

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

7 días ago | 0

| accepted

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

7 días ago | 1

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

7 días ago | 0

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

7 días ago | 0

| accepted

Answered
Plotting an integral function
L=1.5; h=.2; s=.75*L; tbar=1; y=0; icount = 0; for xbar=-1.5:.1:1.5 icount = icount + 1; if xbar>-L & s>xbar ...

8 días ago | 1

| accepted

Answered
I tried Euler's method and RK4 method but I'm getting different results. Please can someone help
%global x_vec dx k %clear %clc %clear all %%%% du/dt = d^2u/dx^2; u is f(x,t) %%%% DFM: (u(x, t+dt) -u(x, t))/dt = k*(u...

8 días ago | 0

Answered
"Trapz" function gives result different than what I calculate by hand
For x = y = [1 2 3 4 5], I = (1+2)/2 + (2+3)/2 + (3+4)/2 + (4+5)/2 = 24/2 = 12.

8 días ago | 1

Answered
ODE15s with non-constant Jacobian
JacFun = J(u_int, deltaZ, Nz, cFeed); options = odeset( 'Jacobian' , @(t,x)JacFun(t, x, u_int, deltaZ, Nz, cFeed), 'RelTol',1e-...

8 días ago | 1

| accepted

Answered
Integration of the expected value
b = 1; N = 2000000; for i = 1:N p(i) = b*rand; pe(i) = p(i) + (b-p(i))*rand; p2(i) = p(i) + pe(i); end ecdf(p...

8 días ago | 1

| accepted

Load more