How to find solution for Blasius Equation?

function blasius
xa = 0; xb = 7;
solinit = bvpinit(linspace(xa,xb,1000),[0 0 0]);
sol = bvp4c(@blasius_equation,@bc,solinit);
xint = linspace(xa,xb,1000);
Sxint = deval(sol,xint);
plot(xint,Sxint([2 2],:));
function res = bc(ya,yb)
res = [ ya(1); ya(2); yb(2)-1];
function dydx = blasius_equation(x,y)
dydx = [y(2); y(3); (-y(1)*y(3))/2];
I did not get the error. But if i change the line "plot(xint,Sxint([2 2],:));" to "plot(xint,Sxint([1 2],:));", i get two lines in the graph. What does this line in the program means?

2 commentaires

Geoff Hayes
Geoff Hayes le 13 Mar 2016
Aruna - what have you tried to verify that the equation is correct? Or, do you observe errors? Please discuss what you have written and why you think it may not be correct.

Connectez-vous pour commenter.

 Réponse acceptée

Torsten
Torsten le 14 Mar 2016
plot(xint,Sxint([2 2],:));
plots y(2) over [xa xb].
I don't know why you or the author of the code does not simply use
plot(xint,Sxint(2,:));
Best wishes
Torsten.

8 commentaires

If xa and xb are not equal then how to use it? why do i get one line in a graph if i use
plot(xint,Sxint([2 2],:));
and two lines in a graph if i use
plot(xint,Sxint([1 2],:));
Blasius equation reads y'''+0.5*y*y''=0.
plot(xint,Sxint([2 2],:));
only plots y' while
plot(xint,Sxint([1 2],:));
plots y and y'.
Best wishes
Torsten.
Aruna P
Aruna P le 14 Mar 2016
thank u
Aruna P
Aruna P le 14 Mar 2016
how could i get the values?
Aruna P
Aruna P le 14 Mar 2016
Sorry i could not understand. Could you help me?
Aruna P
Aruna P le 15 Mar 2016
i tried using "vpasolve" but i am getting error
I don't understand what you are trying to do.
To print the results to a file, use fprintf after the command
plot(xint,Sxint([2 2],:));
Best wishes
Torsten.

Connectez-vous pour commenter.

Plus de réponses (1)

Maria Hamdani
Maria Hamdani le 22 Avr 2017

0 votes

what will i do if i have to print table of f,f'and f'' for different values of eta

1 commentaire

Geoff Hayes
Geoff Hayes le 22 Avr 2017
Maria - please post your above question as a question rather than as an answer.

Connectez-vous pour commenter.

Catégories

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

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by