Error with Cheb function
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 9 Avr 2022
What difficulty are you experiencing?
Walter Roberson
le 9 Avr 2022
Modifié(e) : Walter Roberson
le 10 Avr 2022
Chala Kedir
le 9 Avr 2022
Walter Roberson
le 10 Avr 2022
What error message are you getting, at what line?
Have you installed the Chebfun package? https://www.mathworks.com/matlabcentral/fileexchange/47023-chebfun-current-version
Chala Kedir
le 10 Avr 2022
Modifié(e) : Chala Kedir
le 10 Avr 2022
Torsten
le 10 Avr 2022
Are you sure about your D ?
Shouldn't it be
D = [1, 1/3*pi];
?
Réponses (1)
Bhavana Ravirala
le 15 Fév 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!!
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!