using bvp5c evaluate velocity and temperature at specific points

I need to find the value of and at -1,-0.4,0,0.4,1, approximate the solution upto 5 decimal places
How should I find these in program. Please help me in this regard
The program is written for these equations
Program is given below
close all
clc
n = -1;
b1= 0.5;
b2 = 0.5;
GR1 = 10;
GR2 = 10;
A1 = 0.5;
P = 0.5;
m = 0.3;
Br = 0;
G1 = 1;
G3 = 1;
G4 = 1;
dydx=@(x,y)[y(4);
y(5);
y(6);
b1.*y(4).*y(5)-(1+b1.*y(2)).*(GR1.*G1.*y(2)+GR2.*G1.*y(3)-G3.*P);
b2.*y(5).^2-Br.*G4.*y(4).^2-(b2-b1).*y(2).*Br.*G4.*y(4).^2+b2.*b1.*Br.*G4.*y(2).^2.*y(4).^2;
A1.*y(3)];
BC = @(ya,yb)[ya(1);yb(1);ya(2)-(1+n);yb(2)-1.0;ya(3)-(1+m);yb(3)-1.0];
yinit = [0.01;0.01;0.01;0.01;0.01;0.01];
solint = bvpinit(linspace(-1,1,50),yinit);
S = bvp5c(dydx,BC,solint);

 Réponse acceptée

yeval = deval(S,[-1,-0.4,0,0.4,1]);
veval = yeval(1,:)
thetaeval = yeval(2,:)

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Centre d'aide et File Exchange

Produits

Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by