Answered
Setting 'ReturnCondition' to true when attempting to use solve results in "Unable to find explicit solution"
Rewriting your equation gives the following result. It may happen that the squaring on both sides gives additional solutions tha...

2 years ago | 0

| accepted

Answered
non linear partial diferential equation
I don't see a similarity to the heat equation. You will have to discretize the left-hand side of the equation and use ode15s to...

2 years ago | 0

| accepted

Answered
求助:编写程序求解积分方程中的参数k的值
gamma_wc = 0.38; t_ITZ = 40; D_c = 0.488; lambda = 1.08; fun = @(k) 125/(1+3.15*gamma_wc)-(125-t_ITZ)*D_c-integral(@(x)D_c*(...

2 years ago | 1

Answered
Algae growing. Concentration curve problem
Here is a code for a simple heat-conduction equation dT/dt = d^2T/dz^2 T(z,0) = 0 T(0,t) = 200 T(1,t) = 340 T(0.5,t) = 90 ...

2 years ago | 0

Answered
Usage of ode function
I assume you know r0=r(t=0) and v0=v(t=0). Then r = r0 + cumtrapz(t,(a.*F_yf - b.*F_yr)./I) v = v0 + cumtrapz(t,(F_yf+F_yr-m....

2 years ago | 0

Answered
How to solve the error "Error using sqpInterface Nonlinear constraint function is undefined at initial point. Fmincon cannot continue." Error occurred when calling NLP solver
Before calling "fmincon", call the constraint function with your initial vector. My guess is that it returns NaN or Inf for some...

2 years ago | 0

Answered
Passing out additions parameters after ODE solver.
sol = adsorptionSolver(t,z,yF,TPF) for i = 1:size(sol.y,2) [~,velocity(:,i)] = adsorptionModel(sol.x(i),sol.y(:,i),z(2)-z(...

2 years ago | 0

| accepted

Answered
Using bvp4c for coupled second order ODEs. Issue in calling bvp4c.
guess = bvpinit(y, uinit); y must be the spatial mesh, uinit must either be a function handle that returns a 4x1 vector of in...

2 years ago | 1

| accepted

Answered
Saving an extra variable from PDEPE
After the computation with "pdepe" is completed, call "pdeval" to get the spatial derivatives of your solution on the x-mesh and...

2 years ago | 0

| accepted

Answered
bvp5c:Unable to solve the collocation equations -- a singular Jacobian encountered
I get syms x1 x2 x3 x4 x5 x6 real syms D11 D12 D13 D22 D23 D33 real syms u l1 l2 l3 l4 l5 l6 f1 f2 f3 f4 f5 f6 h1 h2 h3 b1 b2...

2 years ago | 0

Answered
Unable to get the following DAE system of equations solved
The time derivative of the first equation is 1e45 at the beginning. Check your parameters and their units. %% DAE of solution ...

2 years ago | 0

Answered
How to solve Ax=b with some all knowns except some x values
This gives 2 equations in 1 unknown. You must be lucky if you get a value for # that satisfies both equations. In this case, it ...

2 years ago | 1

Answered
difficulty solving simulataneous equations
syms Ra Rb La Lb Va Vb iaD ibD ia ib eqns = [Lb*ibD - La*iaD + Rb*ib - Ra*ia + Vb == Va, iaD == -ibD] S = solve(eqns, [iaD,ib...

2 years ago | 0

Answered
Calculus Variational; code for finding the value of two constants for 2 values of the variable
I didn't check whether the Euler equation gives x(t) = 5*t^3/6 + c1*t + c2, but if this is the case, you can get c1 and c2 via ...

2 years ago | 0

Answered
fsolve not varying input variable
I included your code and inserted the line norm((fun(x0+[0 0 0 0 0 sqrt(eps)])-fun(x0))) before your call to "fsolve". sqrt(e...

2 years ago | 1

| accepted

Answered
I should get a straight line graph in this equation after substituting initial conditions. I dont know where I am getting wrong. Can anyone help me with this?
For which solution variable do you expect a line as solution ? syms t y(t) Dy = diff(y,t); D2y = diff(y,t,2); m=1; k=1; c=...

2 years ago | 0

Answered
below are the codes to solve heat transfer using implicit and explicit method but my implicit method is showing huge error, what is wrong on the implicit method
Implicit scheme means: (ut(i,j+1)-ut(i,j))/dt = (ut(i-1,j+1)-2*ut(i,j+1)+ut(i+1,j+1))/dx^2 or ut(i,j+1)/dt - (ut(i-1,j+1)-2*...

2 years ago | 0

Answered
whether meshes affect computational step lengths in pdepe
Adaptive in x: no. Adaptive in t: yes. Thus the x-mesh affects computational accuracy, the t-mesh not. The accuracy in t is infl...

2 years ago | 1

| accepted

Answered
calculate the perimeter of a polygon arranged in space
After reading the x/y data, sum up the lengths of the line segments that constitute the circumference: perimeter = 0; for i = ...

2 years ago | 0

Answered
Differential Equation - Integral Equation
syms r z k eqn = int((20-1.19e8*r^2)/(1.19e8*r^2),r,30e-6,40e-6)==int(0.54*8*1e-3/4e3,z,0,k); knum = solve(eqn,k) knum = doub...

2 years ago | 0

| accepted

Answered
can anyone help me to get rid of the error not enough input arguments in line 7?
x0 = [10; 0]; Time_Span = [0, 40.0]; [t_ex2, x_ex2] = ode45(@ODE_Damped_Spring, Time_Span, x0); figure; plot(t_ex2, x_ex2(:...

2 years ago | 0

| accepted

Answered
Interpolation schemes that produce positive second derivatives of the interpolant
If you do function approximation (e.g. by splines), there are methods to enforce f''>=0. But for function interpolation, it does...

2 years ago | 1

Answered
Why do I get different lognormal parameters using lognfit vs. using the fit function with the lognormal equation?
Does this help ? https://uk.mathworks.com/matlabcentral/answers/2067676-lognormal-fitting-with-the-pore-size-and-its-probabilit...

2 years ago | 0

| accepted

Answered
How to overcome this error while using lsqnonlin for curvefitting??
clc clear all close all warning off %25wt.% freq = [3.21760012464137 3.47500813461269 3.73241614458399 4.05417615704813 4.3...

2 years ago | 0

Answered
How to integrate a function over an implicitly defined domains
I'd define the function to be integrated as f .* (g>0) and integrate over the rectangular domain. Here, g is the function that i...

2 years ago | 2

Answered
simulation of program in matlab
M2_eq = 1; D2_ov = 1e-2; m=2; x = linspace(0,1,100); t = linspace(0,2,10); u = pdepe(m,@(x,t,u,DuDx)eqn1(x,t,u,DuDx,D2_ov),...

2 years ago | 0

Answered
Error when using lsqnonlin in for loop
As you can see, the dimension of "distances" is only 1x4. But it should be 100x4. And better use objective_function = @(p5) [ ...

2 years ago | 1

| accepted

Answered
simulation of program in matlab
Use MATLAB's "pdepe".

2 years ago | 0

Answered
Integral with limit variable
Note that t is at the same time integration variable and upper limit of the integral. That's confusing. You should rename one of...

2 years ago | 0

| accepted

Answered
i have been trying to solve 50 nonlinear equations simultaneously
epsilon = 0.2; N = 0.5; L = 1; bvpfcn = @(x,y)[y(2);(-epsilon*y(2)^2+N^2*y(1))/(1+epsilon*y(1))]; bcfcn = @(ya,yb)[ya(2);yb(...

2 years ago | 0

Load more