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
Function optimization meeting conditions
ht = rand(401,51); [n,m]=size(ht); I=@(h) sum(sum((ht-h).^2)); h0 = zeros(1,m); v1 = ones(m,1); w1 = -ones(m-1,1); A1 = di...

ongeveer 4 uur ago | 0

| accepted

Answered
define condition of the matrix
syms epsilon digits(100) A = [sym('1') sym('1')-epsilon;-sym('1') sym('1')+epsilon]; C1 = cond(A,1); C2 = cond(A,2); Cinf =...

ongeveer 9 uur ago | 1

Answered
I need a MATLAB simulation for the below second order differential equation
The example "Solve Second-Order BVP" under https://uk.mathworks.com/help/matlab/ref/bvp4c.html tells you exactly how to procee...

ongeveer 9 uur ago | 0

Answered
Solve Equation with symbolic Constants numerically.
syms w a b positive real u = a * w^3/(exp(b*w)-1); du = diff(u,w); wsol = solve(du==0,w)

ongeveer 10 uur ago | 0

| accepted

Answered
Problem writing a summation expression
Either you use "sum" or you make a loop over j. If you don't manage to get C_1, this is an indication that you should visit MAT...

1 dag ago | 0

| accepted

Answered
How to minimize the maximum error?
By a "linear approximating function" you mean a function l with l(x1,x2,x3) = a + b*x1 + c*x2 + d*x3 where a, b, c and d are ...

1 dag ago | 0

Answered
can someone help me regarding my code and error?
Adjust the sizes of the arrays involved in the calculation of "baseStationThroughputs" (see above). Further, use "fcn2optimexpr...

1 dag ago | 0

Answered
Problems related to initial and boundary conditions for solving PDE
This function sets adiabatic boundary conditions at both ends. function [pl,ql,pr,qr] = heatbc(xl,ul,xr,ur,t) pl = 0;%ul-293...

1 dag ago | 0

| accepted

Answered
Underdetermined Constrained Nonlinear System of Equations
My guess is that the x below is one of many other solutions. A = [1 1 1 1 1 1;-0.52 -0.52 0.3 0.3 0.64 0.64;0.94 -0.74 0.94 -0....

1 dag ago | 1

| accepted

Answered
How to set diffrent initial conditions as a vector.
I already showed you how to do that. If xvec and Tvec are your given vectors of grid points and associated temperatures, set ...

2 dagen ago | 1

| accepted

Answered
Runge-Kutta-4th-order solution of 3 ODEs
As you can see above, you get the same plot with a "professional" MATLAB solver (ODE45). So I guess there is something wrong wit...

3 dagen ago | 0

Answered
[Mass Transfer] How do I solve the following infinite series analytical solution to find time (t)? The answers in solution manuals show that the answer is 5085.85 seconds.
D = 1.5e-7; % Diffusivity R = 0.05; % Radius CA0 = 0.2; % Initial Conc. CAS = 0.0; CA_target = 0.1*CA0; % Target Conc. N = ...

3 dagen ago | 0

| accepted

Answered
Integral of user-defined function
Your function is not vectorized. Thus you have to use integral_value = integral(f, 0, Inf, 'ArrayValued',true) instead of int...

4 dagen ago | 1

| accepted

Answered
trying to create a plot of cost per mile when the trailer weight increases in a program I wrote and i cannot get it to work.
%for plot clear clc F='diesel';%input('gasoline or Diesel: ','s'); C=6;%input('number of engine cylinders '); T='yes';%inpu...

5 dagen ago | 0

Answered
Plotting the integral of a graph using cumtrapz.
Then my guess is that some of the x-values (maybe starting around 60) are NaN values. Remove them before applying "cumtrapz".

5 dagen ago | 2

Answered
Loop: for i = 1:L ;
because i got the task to do it like that and not to use: data(:,i+1) = data(:,i) * p. Then use for i = 2:L

5 dagen ago | 0

Answered
Accelerate a loop involving the built-in integral command
You will have to reorder the "Output" array, but I think the code should be faster. my_fun = @(t,param) t.^2; T = 2; omega = ...

6 dagen ago | 0

Answered
Why am i getting this error>>>Index exceeds the number of array elements (1). Error in Boom (line 38) Y(t) = X_best_so_far(t-1); % Use X_best_so_far value for the
As you correctly write in your code, the line X_best_so_far = X_best_so_far(1); % Initialize X_best_so_far as a scalar sets X_...

6 dagen ago | 0

Answered
Using Matlab to solve 1D Schrödinger Equation (Strange Eigenfunctions)
N = 2000; dy = 1/N; y = linspace(0,1,N+1).'; mL2V = @(y)1000*(y-0.5).^2; e = -1/(2*dy^2)*ones(N-1,1); d = 1/dy^2 + mL2V(y(2...

7 dagen ago | 1

| accepted

Answered
Numerically solve a 3rd order differential equation with 3 unknowns
Use "gradient" three times to get approximations for y', y'' and y''' in the points of your t-vector. Let diff_y, diff_y2, diff...

7 dagen ago | 0

| accepted

Answered
How to plot a continuous graph as shown in the below graph?
t1 = [1 6]; y1 = [1 1]; t2 = [6 7]; y2 = [0.45 0.45]; t3 = [7 8]; y3 = [1 1]; t4 = [8 9]; y4 = [0.4 0.4]; t5 = [9 11]; y5 = ...

7 dagen ago | 1

Answered
Storing parameters from a for loop in arrays
t = [0:0.2:3].'; y = [3.43101641262231;-0.527550212558249;3.43697613505530;0.186721377613475;5.11301585254667; 6.786264197...

8 dagen ago | 0

Answered
how can improve my code performanece, it uses a syms vector, i tried to delete y=t= sym(zeros(1, m + 3)); and it's faster but the solution of the function its wrong
You can't use t(k), t(k+1), t(k+2), y(k), y(k+1) and y(k+2) to define y(k). The values for these y's and t's are not yet known. ...

8 dagen ago | 0

Answered
error in for loop
I substituted 1/sqrt(x) by y in your equation. As you can see, there are only negative solutions such that resubstituting gives ...

8 dagen ago | 0

Answered
Why the nonlinear least square fitted curve is not a curve?
Why do you think the red line is not a curve ? For this point cloud of experimental data, I think the red line is the best you ...

8 dagen ago | 1

Answered
Sorting a matrix according to another one
A = [11 0.001 3 11 0.001 4 12 0.003 5 9 0.002 6 8 0.000 7 10 0.004 8 8 0.000 9 9 0...

8 dagen ago | 0

| accepted

Answered
Lower Dirichlet boundary condition for heat equation PDE
Your equations are not suited to be solved with pdepe. Both contain no second derivatives in space which is necessary for an eq...

8 dagen ago | 0

| accepted

Answered
plot between two variables
Use plot(1:365,[PR;ones(1,365)*PR_ave]); instead of plot(PR,PR_ave); if PR is a row vector, or plot((1:365).',[PR,ones(365...

8 dagen ago | 0

Answered
vpa solving 5 equations with 5 unknowns, but result is an empty structure
Did you read somewhere that "vpasolve" can handle inequalities ? Anyway, it seems the problem is too hard for a symbolic soluti...

9 dagen ago | 0

Answered
Second time derivative of ODE45 solution looks bumpy
t=[0 5]; initz=[0; 0]; [t,z]=ode15s(@f3, t, initz, odeset('RelTol',1e-12,'AbsTol',1e-12)); for i=1:numel(t) dz = f3(t(i),z...

9 dagen ago | 0

| accepted

Load more