How to find solution for Blasius Equation?

조회 수: 2 (최근 30일)
Aruna P
Aruna P 2016년 3월 13일
댓글: Geoff Hayes 2017년 4월 22일
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
Geoff Hayes
Geoff Hayes 2016년 3월 13일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2016년 3월 14일
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
Aruna P
Aruna P 2016년 3월 15일
i tried using "vpasolve" but i am getting error
Torsten
Torsten 2016년 3월 15일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Maria Hamdani
Maria Hamdani 2017년 4월 22일
what will i do if i have to print table of f,f'and f'' for different values of eta
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2017년 4월 22일
Maria - please post your above question as a question rather than as an answer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by