# Torsten

Last seen: Today 自 2013 起处于活动状态

Followers: 6   Following: 0

#### Feeds

V2H Optimization: No feasible solution found
Use energyStorage = optimconstr(T); energyStorage(1) = BSS_SOC(1) == 0; energyStorage(2:T) = BSS_SOC(2:T) == BSS_SOC(1:T-1) -...

15 hours 前 | 0

Need to solve the following equation with three knowns and 2 unknowns.
H_BM = rand(100,1); g_mean = rand(100,1); Wi = rand(100,1); Hi = H_BM; gi = g_mean; x = Hi.*gi; y = Wi + Hi.*gi; fitl...

23 hours 前 | 0

Why does Matlab not recognize fieldnames function?
You overwrite the "fieldnames" function by setting it to a variable value: fieldnames = fieldnames(results.digitalMap);

2 days 前 | 0

| 已接受

Simulate Fick's 1st and 2nd laws of mass diffusion.
The correct update for inner grid points is C_new(i,j) = C_old(i,j) + dt * (D_x*(C_old(i-1,j)-2*C_old(i,j)+C_old(i+1,j))/dx^2 +...

3 days 前 | 0

| 已接受

Indices shown in plot are off
My guess is that the x-axis has a resolution of 10.

4 days 前 | 0

issue in calculation of wave speed
The below code will at least give you the correct update of the solution. You don't initialize "half_max_positions" ; that's wh...

5 days 前 | 0

Minimize difference between two data sets
Use [output] = [method](@(AB) my_func(AB(1),AB(2)), [A B]) instead of [output] = [method](@(A,B) my_func(A,B), [A B])

5 days 前 | 0

| 已接受

You mean something like this ? X = linspace(0, 1, 100); W = linspace(0, 2, 30); m = 0; sol = pdepe(m, @pdefun, @ic, @bc, X, ...

5 days 前 | 0

| 已接受

traveling waves of fisher kpp equation

5 days 前 | 0

Summing results at the end of a loop
x = linspace(0, 90.*(10.^-3), 100); w = [7.5.*(10.^-3),7.5.*(10.^-3),7.5.*(10.^-3)]; u = [(8.883).*(10.^-3),(8.883).*(10.^-3),...

5 days 前 | 0

calculate the normal of a 3D plane
I would like to know if it is correct to calculate the normal of this plane in the following way: N = cross(P(1,:) - P(2,:), P(...

6 days 前 | 0

| 已接受

"Empty sym" when solving a system of linear equations with different conditions
Your system only has a (nontrivial) solution if i = 1. In this case, the solution is given as below. syms Z1A Z2A Z3A Z4A Z1B Z...

6 days 前 | 0

Temperature profile in a pipe flow with Matlab pdepe solver
I corrected as much as I could, but the computation of Q looks different in your code in comparison to the article. %% Main cod...

7 days 前 | 0

Substitute partial differential into symfun
syms G(h) h(t) t Q = G(h) dGdt = diff(Q,t) % -> D(G)(h(t)) occurs s = children(dGdt) % Now define G(h) and derive: G ...

7 days 前 | 1

| 已接受

Using a loop to add rows to a struct, but the counter overwrites the rows.
I don't know how "trial" and "blockInfo" are organized. Here is one suggestion: for ifile = 1:3 for s = 1:nTrials struc...

7 days 前 | 0

I am trying to perform a simple operation FOR loop. I think I am not able to get the indexing right.
%% why does not the following operation work Because the numbers 1,2 and 3 in t1, t2 and t3 are not indices you can loop over, ...

7 days 前 | 0

| 已接受

Kelvin functions ker kei functions evaluation
The value kei(0) = -pi/4 only exists in the limit : syms x a = exp(pi*1i/4); limit(imag(besselk(0,a*x)),x,0,"right") limit(i...

7 days 前 | 0

constrained optimization with Matlab, symbolic function
If your function f is symbolic, you first have to convert it to a numerical function by using "matlabFunction". k_tot = ...; a...

8 days 前 | 0

I am unable to find the minimum value of function f in this optimization problem. The solver always returns 0 for all variables which is not possible. I am unable to correct.
The solution is correct: A*x <= b is satisfied, and since all elements in the f-vector are positive, 0 is optimal. Maybe you wa...

8 days 前 | 0

int function is not working properly in matlab
Evaluate gamma(n_star_D3(i)+l_d+1) gamma(n_star_D3(i)-l_d) and you will see the reason. Consequently, Gff_D3(i)...

8 days 前 | 0

Negative sign produced by "functionalDerivative" - why?
As you can see here at the bottom of the page https://uk.mathworks.com/help/symbolic/sym.functionalderivative.html functionalD...

9 days 前 | 0

Cost of buy with price 26 is 2*26 + c = 152 in your setting. Note that although you don't generate energy, Cg_i(0,a,b,c) = c - t...

10 days 前 | 1

| 已接受

Why the results of three codes with the same expression and method are different ?
Integrate equation (1) from x = 0 to x = x, and the problem will become much easier. dvdx0ini = 1; St = [0.1,0.5,1]; hold on ...

11 days 前 | 0

Curve fitting and parameter estimation with lsqcurvefit
% Load data data = readtable('infections.csv'); dates = datetime(data.Date, 'InputFormat', 'dd-MMM-yy'); cases = data.Cases; ...

12 days 前 | 0

How to set lower bound lb as a function of optimization variable.
Use function "nonlcon" to define nonlinear equality and inequality constraints. If v(i) depends linearly on the solution variab...

12 days 前 | 2

When using 'quadprog' how do I limit certain solutions so that they can only become whole numbers?

12 days 前 | 0

Synthax for equation in script
r0 = 3; r1 = 4; delta = linspace(-r0,r0,31).'; k = linspace(-r1,r1,31).'; 0.5*sqrt((delta+k.^2).^2+4*k.^2)

13 days 前 | 0

Equal arc discretization method code
warning("off") syms t t1 t2 % Parameters R2 = 12; %outer radius (between this radius and R1 is constant arc increment) b = 2...

13 days 前 | 0

A quatity is being solved by a self consistent integration
format long syms x A = 2000; a = 500; b = 1000; Z = 0; for i=1:20 f = x^4*((A^2+Z^2)/(A^2+4*(x^2+a^2)))^4 / (sqrt(x^2+...

13 days 前 | 0

| 已接受

How can I write the term \sum_{q=1}^{m} b_{pq}(t)g_q(y_q(t-\tau_{q}(t))) to produce the same graph
I don't know exactly what you are asking for, but if it's about solving Equation 1, you will have to use a solver for delay diff...

14 days 前 | 0