Respondida
How should I set the value of u_tau?
The problem simply is that you cannot solve delay PDEs with "pdepe", at least not directly. A possible remedy: Call "pdepe" in...

más de 1 año hace | 0

Respondida
Calculate the summation of second column in both arrays
array = [2 5;7 -4]; sum(array(:,2))

más de 1 año hace | 0

| aceptada

Respondida
Function with multiple input parameters to be determined through fitting
You have to use "integral" instead of "int" and loop over the elements in E_p: EM_SS([1 1 1 1 1 1],1) function F = EM_SS(p, e_...

más de 1 año hace | 0

| aceptada

Respondida
How to solve a system of nonlinear differential equation that follows some pattern
function dy = fun(t,y) dy = y.*[y(2:end);y(1)] end or a function handle fun = @(t,y) y.*[y(2:end);y(1)]

más de 1 año hace | 1

Respondida
Interpolating the y values of a dataset A to correspond to the x values of dataset B.
The easiest way I can think of is y1_at_x2 = interp1(x1,y1,x2) If it's precise ? Define precise. At least you have the choice ...

más de 1 año hace | 1

| aceptada

Respondida
Hi, i try to solve equation c in terms of other variables, and its appear the messages and the answers is not as expected. Is supposed to be beta/p^(1/sigma)? is it?
Maybe you want to restrict the parameters to be positive (and thus real-valued): syms beta c sigma p positive eqn1 = beta/c^si...

más de 1 año hace | 0

Respondida
How to solve 3 linear equations symbollically?
The first two equations in "velocity_eq" only have "omega_output_z" as variable and contradict each other (see above).

más de 1 año hace | 1

| aceptada

Respondida
Problem with matrix dimensions
In "sistema", I made F a column vector by adding a last line as F = F(:); and it works.

más de 1 año hace | 0

Respondida
Nonorthogonal eigenvectors for general eigenvalue problem with eig() and eigs()
From the documentation: [V,D] = eig(A,B) returns diagonal matrix D of generalized eigenvalues and full matrix V whose columns a...

más de 1 año hace | 0

Respondida
Finding the minimum distance between two matrices
https://uk.mathworks.com/matlabcentral/fileexchange/34869-distance2curve Use one matrix to generate the curve and the other dat...

más de 1 año hace | 0

Respondida
How to solve a fourth order differential equation (boundary value problem) with constraint?
And as far as I see, a necessary and sufficient condition that w'''' is bounded on [0 l] is w(0) = 0, and that's what you alread...

más de 1 año hace | 0

Respondida
How to delete variables in a table within a cell array
for i=1:10 c{i}(:,1:2) = []; end

casi 2 años hace | 0

Respondida
Index in position 1 exceeds array bounds. Index must not exceed 1.
A is a single value, namely A = b*h + z*h^2; % Cross-sectional area (m^2) But in your double loop, you treat A as if it we...

casi 2 años hace | 0

Respondida
Why are these interations not working?
x1 = 16/2; y1 = 25/5; fyx = -1/2; fxy = 1/5; x2 = fyx*y1 y2 = fxy*x1; x3 = fyx*y2 y3 = fxy*x2; x4 = fyx*y3 y4 = fxy...

casi 2 años hace | 0

| aceptada

Respondida
Crank-Nicholson method
I suggest the following code: xstart = 0; xend = 1; tstart = 0; tend = 1; nx = 10; nt = 100; x = linspace(xstart,xend,nx)...

casi 2 años hace | 0

| aceptada

Respondida
Calculate total heat loss by conduction given temperature and depth profile vectors
Here is another way to determine the temporal change of heat content in the substratum. rho*cp*dT/dt = d/dx (k*dT/dx) Integrat...

casi 2 años hace | 0

| aceptada

Respondida
Calculate total heat loss by conduction given temperature and depth profile vectors
How can I estimate the total heat loss (w/m2) at each time interval (i.e., the heat loss for every profile)? Total heat flow in...

casi 2 años hace | 0

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

casi 2 años hace | 0

| aceptada

Respondida
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,...

casi 2 años hace | 0

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

casi 2 años hace | 0

| aceptada

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

casi 2 años hace | 0

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

casi 2 años hace | 0

| aceptada

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

casi 2 años hace | 1

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

casi 2 años hace | 0

Respondida
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;...

casi 2 años hace | 0

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

casi 2 años hace | 0

Respondida
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:...

casi 2 años hace | 0

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

casi 2 años hace | 0

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

casi 2 años hace | 0

Cargar más