why do i receive this statement is incomplete?

This is my code and I keep getting the error "This statement is incomplete." several times throughout but can't find the mistake. please find out my mistake...i have attached my equation file.

1 Comment

@Priya M: please show us the complete error message. This means all of the red text.

Sign in to comment.

 Accepted Answer

I get this message, if I run your code:
Undefined function or variable 'Pr'.
Error in
odeequation>@(x,y)[y(2);y(3);((-(y(1)*y(3))+M*(y(2)-1)+y(2)^2-Gr*y(4)-Gc*y(6))/(1+1/beta));y(5);(-Pr*(y(1)*y(5))-Pr*Ec*(1+beta^-1)*y(3)^2-Pr*Ec*(y(2)-1)^2*M)/(1+(4/3)*R);y(7);-Sc*(y(1)*y(7))-Sc*K*y(6)]
Error in bvparguments (line 105)
testODE = ode(x1,y1,odeExtras{:});
Error in bvp4c (line 130)
bvparguments(solver_name,ode,bc,solinit,options,varargin);
Error in odeequation (line 12)
fsol = bvp4c(dydx,res,solinit);
This looks, like the problem is inside the function "Pr". Please look there or post this function.

15 Comments

yes sir, i forget to define pr value before...
Now my query is, I want to genare the figure im showing here, but im am not getting the desired graph .
I am attaching both desired graph and coupled equations with boundary condition.
Ive attached my bvp4c code also.
I would be very helpfull for your help.
My first idea is, that the formula in the PDF does not match the one in the code.
I can't find my mistake sir...
Remember, that I have no chance to know how you have called the variables from the PDF in your code. I do see "F eta eta eta" and "y(1)", but how are they realated? The missing documentation of your could makes it impossible to guessm what you have done.
In the forst equation I see "Gr * theta + Gr * Phi", while in the code "- Gr*y(4) - Gc*y(6))" the constants Gr and Gc might be different.
In the 3rd line of your code I guess you evaluate f eta eta eta. Then you brought all other terms to the right side by subtracting it and divide by (1 + 1/beta) afterwards. But where does the "-" in "-beta" come from? I'd expect a +beta here.
So please write down your calculations carefully in simple steps, such that you can cross-check them again.
The final limit xb does not match the diagram you have posted.
sir herewith i hve attached my manual work..hope this will help you, which you asked yesterday..
Jan
Jan on 5 Feb 2021
Edited: Jan on 5 Feb 2021
And which of the 3 posted codes is the one, you are currently working with? The latest version was in https://www.mathworks.com/matlabcentral/answers/733623-why-do-i-receive-this-statement-is-incomplete#comment_1306002 . As said already, it contain at least the misplaced minus before beta in the third line. In addition Pr is missing in the code.
yes sir , Now i understood my mistake...
I need graph which i have mentioned below (pdf file)...
herewith, my equation which i have corrected now and my new figure also attached ...
sir ,Is any idea about my query?
When I run your code, I get the same output as you. BVP4C shows a warning message:
Warning: Unable to meet the tolerance without using more than 1428 mesh points.
The last mesh of 766 points and the solution are available in the output argument.
The maximum residual is 2.22618, while requested accuracy is 0.001.
What exactly is the problem now?
Using something like
options = bvpset('NMax', 1e6);
sol = bvp4c(@shootode,@shootbc,solinit, options);
will get around the warning.
When I was working with someone else recently, getting past the mesh problem exposed a problem with Singular Jacobian
sir, I need graph as which i have shown below (pdf file)...but some mesh point warning occurred...what to do for it?
Herewith, I have attached my desire graph and code...
JAN sir, my problem is to correct my curves like desired graph...
@Priya M: You povide a graph for:
  • M = 0.2, 1, 2, 5, t=0:5
and some code for:
  • for M=0.5, 0.2, 0.5, t= 0:12 and modify other parameters beta and K also between the curves.
How can we guess, which parameters are wanted?
The 7th component is in your code:
-Sc * (y(1) * y(7)) - Sc * K * y(6)
With:
I'd expect:
-Sc * (y(1) * y(7)) + Sc * K * y(6)
% ^
The boundary condition contain infinity:
As far as I can see, your code uses the final point 12:
res = @(ya,yb) [ya(1)-0.5; ya(2)-1; ya(4)-1; ya(6)-1; ...
yb(1); yb(4); yb(6)];
Is this the correct approach?
sir , I need variation of M parameter on velocity , temperature and concentration profile..
The fixed values of the governing parameters are
beta=0.5, M=1.0,Pr=0.71,Gr=Gc=3.0,Sc=0.3,K=0.3,f_w=0.5,R=0.5,Ec=0.1...
Is there any mistake in my boundary condition ? if it is please correct me sir..
The boundary conditions contain the final time infinity. Of course you cannot integrate to infinity, because this would need an infinite amount of time. But a boundary at infinity is only meaningful, if the values are constant there. This means, that all derivatives must vanish at this point.
Can you transform the equations mathematically such, that knowing the values and vanishing derivatives at t=Inf allows to determine the corresponding missing initial conditions? Then you would get an initial value problem, which can be solved by an integrator instead of a BVP solver.

Sign in to comment.

More Answers (0)

Asked:

on 2 Feb 2021

Commented:

Jan
on 18 Feb 2021

Community Treasure Hunt

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

Start Hunting!