Beantwortet
how can i decoupling this system of equation? and solve it by ode.
This is a linear system of equations in theta1_dotdot and theta2_dotdot. Solve it explicitly for theta1_dotdot and theta2_dotdo...

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 1

Beantwortet
[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 = ...

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

Beantwortet
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".

etwa 3 Jahre vor | 2

Beantwortet
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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

Beantwortet
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_...

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

Mehr laden