回答済み
data not generating and error in plotting
And what is the "correct" result ? According to your mathematical description, I get this: % Define initial parameters lambda...

約2年 前 | 0

| 採用済み

回答済み
Problem with the fitting
% Define the data dr_data = [2.5453, 0.042123; 5.0907, 0.075326; 7.636, 0.059506; 10.1813, 0.071553; 12.7267, 0.071365; 15.272,...

約2年 前 | 0

回答済み
Second order coupled differential equation
X0 = [0; 0; 0]; % initial conditions r = linspace(1, 50, 100); % resistance range tspan = linspace(0,100, 100); freq_vector...

約2年 前 | 0

| 採用済み

回答済み
Use of Fmincon for stress relax data
I suggest you read the examples for the different suitable solvers. They will show you exactly how to proceed for your case. Ma...

約2年 前 | 0

回答済み
use of pdepe for a space-dependent diffusivity
First: Don't name the vector "diff" since "diff" is an internal MATLAB function. Name it D, e.g. Second: To get the correct val...

約2年 前 | 0

| 採用済み

回答済み
If I have an array and I need to find an element in the array how do I go about it?
Compute 100*states(:,1)+10*states(:,2)+states(:,3) and use "find" to compare with C.

約2年 前 | 1

回答済み
Solve a differential equation and determine when it gets close to steady state
You can use an event function for the ODE integrator and stop integration when abs(dy/dt) (in your case abs(0.1 * (c-20) * (23-c...

約2年 前 | 0

回答済み
the degradation of ozone in aqueous solutions (water). When I plot the all three components, the plot stays at the 0 value for all components.
There seems to be a singularity in the solution at t approximately 320. ProjectOzone() function ProjectOzone clc ki = 7e-3;...

約2年 前 | 0

回答済み
The code below runs nonstop, and the results are not shown. why is that?
The code below runs nonstop, and the results are not shown. why is that? "solve" won't succeed for your system of equations bec...

約2年 前 | 0

回答済み
Create number of for loops depending on size of N
The N columns of the resulting C-matrix contain i_first, i_second,... imax = 8; N = 4; i_average = (sum(0:N-1)/N+sum(imax:-1:...

約2年 前 | 0

回答済み
How to make Matlab recognize that an expression rewritten by using subexpr() is equal to the original expression?
You have to resubstitute sigma by (a+b+c+d+e)^(1/2) in x_2 to compare with x: syms a b c d e f x x = a + (a+b+c+d+e)^(1/2) + c...

約2年 前 | 0

回答済み
plot the output c(t) using mathlab and show setting time on you graphf
Use "fplot" as done in your code above.

約2年 前 | 0

回答済み
Describe the solution trajectory of differential systems with mixed time-varying delay
To write your equations as a system of delay differential equations that can be handled by a MATLAB solver, set x3 = integral_{...

約2年 前 | 1

| 採用済み

回答済み
Plot between Nu vs Ra
Replace Ra_values = 10:100:100000; by Ra_values = (10:100:100000).';

約2年 前 | 0

回答済み
Resetting only a section of my state during event driven ode45 simulation
After the event has been triggered, control is returned to the calling program. If you want to continue integration with the e...

約2年 前 | 1

回答済み
Index exceeds the number of array elements. Index must not exceed 1.
path_length_BS_IRS_reflect_UE(i) does not exist for i > 1 because path_length_BS_IRS_reflect_UE is a scalar value, namely 223.60...

約2年 前 | 0

回答済み
Dot indexing is not supported for variables of this type.
Test before your loop % Loop through each entry in the list and extract data for i = 1:numEntries dt(i) = dateti...

約2年 前 | 0

| 採用済み

回答済み
How do I know what method Matlab is using when plotting ltiview?
I don't know Itiview nor risetime, but isn't there a literature link in the documentation for the function you are using ? If ...

約2年 前 | 0

回答済み
How to solve algebraic equations for different values of variables ?
% Solve the equation eqn = Ac.*I.*eta-m.*c.*(Te-Ti)==0 for i=1:numel(eqn) s = solve(eqn(i),Te); S(i) = vpa(s(s>=0)); en...

約2年 前 | 0

回答済み
function file used with 2 Matrices as input
You are not allowed to use the same name for the function and an output array. Thus rename one of them. And ln_AOU as output pa...

約2年 前 | 0

| 採用済み

回答済み
Solving a linear programming problem uising linprog
A = -[110 205 160 160 420 260;... 4 32 13 8 4 14;... 2 12 54 285 22 80]; b = -[2000; 55; 800]; Aeq = []; beq = ...

約2年 前 | 1

| 採用済み

回答済み
BVP Error, help with explaination
The solver is no longer able to capture the steep gradient of your solution at x=0. Look at sol.x in the last step of the cont...

約2年 前 | 0

回答済み
Data type symfun (code problem)
If your MATLAB release throws an error (R2024a does not as you can see above), try [n(x) d(x)] = numden(df(x)) instead of [n ...

約2年 前 | 1

回答済み
The estimation error is strangely obtained from Simpson's 1/3 rule...
syms a b c d e real syms t real f(t) = a*t^5 + b*t^4 + c*t^3 + d*t^2 + e*t; s = 0; i = -1/2; while i < 959.5 i = i + ...

約2年 前 | 2

| 採用済み

回答済み
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) -...

約2年 前 | 1

| 採用済み

回答済み
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...

約2年 前 | 1

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

約2年 前 | 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 +...

約2年 前 | 0

| 採用済み

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

約2年 前 | 0

さらに読み込む