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
How to solve coupled second order ODE?
b = 0.1; fun = @(t,y)[y(2);-b*y(2)*sqrt(y(2)^2+y(4)^2);y(4);-b*y(4)*sqrt(y(2)^2+y(4)^2)]; y0 = [0;44.5;80;0]; tspan = [0,10];...

8 hours ago | 0

Answered
Getting the summation of a series
h=[ 1 3 5 7 9 11 13 15] ; ah = [35.8577 -6.2962 -1.2855 3.9251 -3.8197 2.2690 -0.4077 -0.9397 ]; alpha = lins...

9 hours ago | 1

| accepted

Answered
Using fminsearch() for MSD system
p0 = [50 400]; p = fminsearch(@fun,p0) function objective = fun(p) k2 = p(1); c2 = p(2); %tspan = [0,0.3]; %observing sys...

14 hours ago | 0

| accepted

Answered
Create a unit vector from two locations?
is this correct? No. MTH2 = [0.472 1.364 0.06] CoM = [0.471 1.147 0.903] UnitVector = (CoM - MTH2) / norm(CoM - MTH2)

14 hours ago | 0

Answered
how to use derivative of function using gradient?
Forget about y(13) and use dydz(2) = y(3); %Specific mass balance (CH4) dydz(3) = ((y(1)*y(3))+(dens_cat_weighted*r_CH4))/(D_m...

14 hours ago | 1

Answered
How to solve differential equation including derivative of eigenvalue of tensor?
See if it works. I cannot test it. syms s A = sym('A',[3 3]); % Define characteristic polynomial determinant = det(A-s*eye(3...

15 hours ago | 0

Answered
Minimalization problem LinearConstraint and conjugate gradient optimizer
According to the Python code, F is maximized, not minimized. Change in the below code if appropriate. M = [0.170543 0.327434 0....

17 hours ago | 0

Answered
Performing Chi Square Test
Source: https://de.mathworks.com/matlabcentral/answers/96572-how-can-i-perform-a-chi-square-test-to-determine-how-statistically...

1 day ago | 0

Answered
Substitute symbolic matrices into numerical matrices
Do you know Cramer's rule ? A = sym('A',[3 3]); b = sym('b',[3 1]); x = sym('x',[3 1]); sol = solve(A*x==b,x) And now pleas...

1 day ago | 0

Answered
System of Nonlinear Equations are failing to be solved
In my opinion, it should be eq1 = C_arg + P_arg == pi-phi_m*pi/180; instead of eq1 = C_arg + P_arg == pi-phi_m*180/pi; (see ...

1 day ago | 1

| accepted

Answered
Force a starting point on exponential graph
You must normalize to time = 0, not time = 24.4. The initial mass is the key, not the mass when already 24.4 (whatever) have pa...

1 day ago | 0

Answered
How do I write the below code in efficient way in MATLAB?
Q = [16,32,64,128,256,512,1024]; VEC=[0.2380 0.2380 0.2380 0.2380 0.2380 0.2380 0.2380 1.1898 1....

1 day ago | 0

| accepted

Answered
Please help me in plotting the following functions.
Limits of Euler's beta function are 0 and 1, not a and b. So C_m,i^nu = beta(i*nu+3,(m-i)*nu)/beta(i*nu,(m-i)*nu) + 2 and th...

1 day ago | 0

Answered
How to plot 4 curves with different constants?
y = @(C,x) (C-x)./(1+x.^2); C = [1 2 3 4].'; x = -2:0.1:2; plot(x,y(C,x))

3 days ago | 0

Answered
Use of 'ArrayValued' in Matlab numerical integration
f = @(x) 5*ones(size(x)); integral(f,0,2)

4 days ago | 1

Answered
How to write a code that takes a vector and outputs true if its the same forwards as it is backwards and false if not?
https://de.mathworks.com/help/matlab/ref/flip.html answer = isequal(v,flip(v))

4 days ago | 1

Answered
Unable to perform assignment because the size of the left side is 360-by-1 and the size of the right side is 360-by-360.
Elementwise division is required: hip_percent(:,2) = 0.14*asis_d./hip_d + 0.5*(hip_d - asis_d)./hip_d; or simpler hip_percent...

4 days ago | 0

| accepted

Answered
angle function in matlab formula
It's all written in the MATLAB documentation of "angle": Algorithms angle takes a complex number z = x + iy and uses the atan2...

4 days ago | 1

Answered
Using anonymous functions with vectors of unknown number of elements and getting the coefficients associated with the variables
Then n_s = 2; u = randi([-9999, 9999], 1, n_s) c = sym('c',size(u)); kappa = expand((1+u*c.')^2) coefficients = coeffs(ka...

4 days ago | 1

| accepted

Answered
Nonlinear regression not working
clc; clear all; input0= [160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136...

4 days ago | 0

| accepted

Answered
Find close points in two matrices of coordinates
Use "pdist2" to calculate the distances of the sites of the first set to the sites of the second set. Check which rows of the d...

5 days ago | 0

Answered
How to fasten the loop
Maybe there are faster commands than arrayfun for extracting the elements of LONG in cell arrays that correspond to sequences of...

5 days ago | 0

Answered
Normal random number generation
pd = makedist('Normal'); t = truncate(pd,0,1); r = random(t,1e6,1); figure(1) histogram(r,100) Or directly: r = -sqrt(2)*e...

5 days ago | 1

Answered
cumsum function question for integration
cumsum(y_cos*inter_val); is a Riemann sum for the integral of sin(t) - integrated between 0 and x. But the integral of sin(t) ...

5 days ago | 1

| accepted

Answered
I want to do exponential fitting for power decaying with time
x=[ 65.10 1.0000e+000 65.90 61.0843e-003 70.30 21.3693e-003 ]; fun = @(p)exp(-p*(x(:,1)-65.1)); f...

5 days ago | 0

Answered
How to define an ellipse by the eigendecomposition of its transformation matrix?
phi = linspace(0,2*pi,100); S = [1 0;0 4]; xy = S*[cos(phi);sin(phi)]; theta = pi/4; Sxy = [cos(theta) -sin(theta);sin(theta...

5 days ago | 2

| accepted

Answered
I have some coupled nonlinear ordinary differential equations. Three equations have three 2nd order derivative coupled together. Can someone tell me how I can get the response
Solve the third equation for theta_dotdot and insert this expression in equations (1) and (2). Then use the usual substitution...

5 days ago | 1

| accepted

Answered
When calling a user defined function, MATLAB throws an error for simple matrix multiplication
"const1" and "const2" are not visible in "planck_function" since you didn't declare them as "global" in the calling program. Bu...

5 days ago | 0

Answered
How can i use optimproblem as a free derivatives method?
https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8736798

6 days ago | 0

Load more