Community Profile

photo

Torsten


Last seen: Today Active since 2013

Statistics

  • Most Accepted 2022
  • Explorer
  • Master
  • 36 Month Streak
  • Revival Level 2
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

View by

Answered
Plot a nx2 matrix as points
A=[0.5 2; 1.0 -0.8; 1.5 -2.5]; plot(A(:,1),A(:,2),'o')

17 minutes ago | 0

| accepted

Answered
Solve two equations for one variable
syms P_st vdq_st_abs Vabs delta_st Vangle Xg Q_st real eq1 = P_st - vdq_st_abs * Vabs * sin(delta_st - Vangle) / Xg == 0; eq2 ...

1 hour ago | 0

Answered
non linear regression problem. fitnlm gives error
Look at the values of K and B. Do you really want to approximate B by a*K^b ? format long K = load("FITDATAK.mat"); K = K.FIT...

1 hour ago | 0

Answered
Am I doing thid correct. pdepe function
x = 0:0.1:1; t = 0:0.05:0.5; m = 0; u = pdepe(m,@PDEeqn1,@initial1,@bc1,x,t); plot(x,[u(1,:);u(2,:);u(3,:);u(4,:);u(end,:)])...

17 hours ago | 0

Answered
How to solve coupled systems of PDEs and ODEs using method of lines
http://www.scholarpedia.org/article/Method_of_lines/example_implementation https://www.sciencedirect.com/science/article/abs/pi...

21 hours ago | 0

Answered
How to check the degree of parallelism of the result of intersecting planes (objects) in affine space and to get an indicator of how much they are in the same orientation??
The intersection of P1 and P2 is given by x = origin1 + directions1*lambda the intersection of P1 and P3 is given by x = orig...

2 days ago | 1

Answered
Hi i have created a code for adsorption process breakthrough curve following one of the examples, however i still have some orange cations around please help
You solve in q, not in qstar. Thus q=y(Nz+1:2*Nz); instead of qstar=y(Nz+1:2*Nz); Further, I doubt that qstar(i)=qm.*ks.*c...

2 days ago | 0

Answered
Error with ode45 in line 89. Trying to use ode 45 to give data on a 4x4 state space matrix
M1=1; M2=1; K1=2; K2=2; B1=1; B2=1; x1_0=1; v1_0=1; x2_0=0; v2_0=1; %% equations q0=[ x1_0 v1_0 x2_0 v2_0]; dQdt = ...

3 days ago | 0

Answered
How to use fminbnd but with multiple variables
In the case above, your objective function is separable in the optimization variables. Thus you can solve two independent proble...

3 days ago | 1

Answered
How can I obtain all possible combinations of 3 decimals whose sum equals 1, without running into memory and space issues?
If you have some time, you can try I = 0:0.001:1. Why don't you use the code from the File Exchange ? I = 0:0.01:1; n = num...

3 days ago | 0

Answered
Help creating an array with uniformly distributed random numbers (row-wise) comprised between 0 and 1, with each column having a sum of 1
https://uk.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum You cannot expect the usual uniform dist...

4 days ago | 1

| accepted

Answered
How can I input sum over in function depend on time?
Never make changes in the RK4 function. Changes have to be made in the call to RK4 and in f. tstart = 0; tend = 100; dt = 0....

4 days ago | 0

| accepted

Answered
Solving stokes flow use pde toolbox
The (simplified) Navier-Stokes equations need a special numerical treatment and cannot be solved by a general-purpose code like ...

5 days ago | 2

Answered
How do i fix the error that i am getting?
Remove the semicolon behind the line pivotColumns = rrefA(:,1:end-1); execute the code and see if it makes sense to insert the...

5 days ago | 0

| accepted

Answered
try to find hessian matrix
The vector of independent variables is (x1,x2,...,xn): syms i k n = 3; x = sym('x',[1 n]) f = n*log(k) - n*log(1/n*sum(x.^k)...

5 days ago | 0

Answered
Integration time step in ODE45 Matlab
If you use a two-element vector for tspan only giving the start and end time of integration, the values T(i+1)-T(i) (i=1,...,end...

5 days ago | 0

Answered
I am struggling to set a maximum value for a output for a function. I have nested my function in another but it is giving an error.
Instead of programming if-statements within the function routine and setting parameters depending on the actual time t, you shou...

5 days ago | 0

| accepted

Answered
Getting this error : Operator '==' is not supported for operands of type 'cell'. what should I do?
https://uk.mathworks.com/help/stateflow/ref/strcmp.html

6 days ago | 0

Answered
Problem with convergence using newtons method
Use PHI = matlabFunction(phi,'Vars',{n,k}) jacob_PHI = matlabFunction(jacob_phi,'Vars',{n,k}) n0 = -0.3; k0 = 3.4; instead ...

7 days ago | 0

Answered
Iterative Process to find a variable in which two equations are equal and opposite
Here is at least one solution for h: % Equation Eo=1; Uo=1; Fc=1.03; Wc=2*pi*Fc; b=0.3; Ed=100; Ud=1; h0 = 10; fun = @...

7 days ago | 0

Answered
Error using Time dependant Boundary Conditions with PDEPE
If "time" is the array corresponding to the data matrix, use data_actual = interp1(time,data,t) and set pr = [data_actual(1)...

7 days ago | 0

| accepted

Answered
Solving nonlinear equation with parameter
Tau = 0:0.01:1; kc0 = 270; Ea1 = 21500; Ea2 = 121500; n = 0.63; eps = 0.52; Cch4 = 0.2; Temp = 800 + 273; kcmax = kc0*ex...

7 days ago | 0

| accepted

Answered
How do I generate numbers from an Exponential Distribution within Min and Max values?
pd = makedist('Exponential','mu', 1.5); n = 100; lb = 0.5; ub = 4.3; rv = zeros(n,1); i = 0; while i < n r = random(p...

7 days ago | 0

Answered
Index in position 2 exceeds array bounds
I already showed you how to solve "ode" as well as "ode1" simultaneously for D2p and D2q. This is necessary because both depend ...

8 days ago | 0

| accepted

Answered
Error due to integration
%filename ='Torque.xlsx'; %sheet = 'Averages'; %A = readtable(filename,'Sheet',sheet,'Range','A3:L32'); %A = table2array(A); ...

8 days ago | 0

| accepted

Answered
How do I fix "Index in position 2 exceeds array bounds (must not exceed 1)."
Before entering the loop after which the error message pops up, type size(gamma) size(sigma_g) size(g_omega_q_k_q) and chec...

8 days ago | 0

Answered
optimization for nonlinear equation using fminunc
x0 = [1 1 1]; fun = @(x) x(1)*dsdt + x(2)*s.^x(3); f = @(x) sum(sum((fun(x) - p).^2)); x = fminsearch(f,x0) lhs = fun(x)

8 days ago | 0

| accepted

Answered
Trouble formulating Range Kutta
The expression [-ka3*A\[0; 1 ;0] zeros(3,1)] must be 6x6 instead of 3x2 in order to work for your system. And the numerical i...

8 days ago | 0

Answered
Unable to perform assignment because the size of the left side is 10-by-1 and the size of the right side is 10-by-1-by-10.
In the assignments RHS(:,pp,gg) = (((1-alpha1(pp)... and RHS(:,pp,gg) = (((1-alpha2(pp)... the resulting term on the righ...

10 days ago | 1

Answered
Generate function handle for odesolver dynamically
Define your equations by a function instead of a function handle. In the function, you can make a loop in order to account for t...

11 days ago | 0

| accepted

Load more