Filter löschen
Filter löschen

Error with Cheb function

3 Ansichten (letzte 30 Tage)
Chala Kedir
Chala Kedir am 9 Apr. 2022
Beantwortet: Bhavana Ravirala am 15 Feb. 2023
Where the ODE is
with boundary condition
y(1)=sin(1)
D = [1/pi*3 ,1];
N = chebop(D);
N.lbc = [1];
N.rbc = 1 - sin(1);
N.op = @(t,x,y) diff(y,2) + (2/x)*diff(y,1) + (1/(x^4))*y;
[x, y] = N\0;
plot([x, y]);
  6 Kommentare
Chala Kedir
Chala Kedir am 10 Apr. 2022
Bearbeitet: Chala Kedir am 10 Apr. 2022
this is the error message I get
Error using chebop/linearize
Failed to evaluate operator on the initial guess passed (or the one constructed
by CHEBOP). A potential cause might be division by a zero CHEBFUN. Please supply
a valid initial guess via the 'init' field of the CHEBOP.
Error in chebop/solvebvp (line 109)
[L, residual, isLinear] = linearize(N, u0, x);
Error in \ (line 56)
[varargout{1:nargout}] = solvebvp(N, rhs, varargin{:});
Error in untitled (line 6)
[x, y] = N\0;
Torsten
Torsten am 10 Apr. 2022
Are you sure about your D ?
Shouldn't it be
D = [1, 1/3*pi];
?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Bhavana Ravirala
Bhavana Ravirala am 15 Feb. 2023
Hi,
The error you received indicates that the operator fails to evaluate the initial guess. To resolve this error, we can assign the initial guess with the boundary conditions.
N.init = [0; sin(1)];
Hope this helps!!

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by