Hey,
I am using the eval function in combination with the solve
function, as can be seen in the following:
syms x % Setting x as an unknown
Equation = eta_p/(climb_rate_ms+(sqrt(OptimumWS)*sqrt
(2/rho_sea)/((1.345*(x*e)^0.75)/CD_0^0.25)))-OptimumWP;
A_clr_opt = eval(solve(Equation));
(Matlab finds Equation to be equal to:
Equation =
4/5/
(1143/125+1914868778638812090507823564875/36630645762454402
33426508578816*33^(1/4)*40^(3/4)/x^(3/4))-
3969249135925473/36028797018963968 )
However, I get the following error message:
??? Error: This statement is incomplete.
Error in ==> sym.eval at 9
s = evalin('caller',map2mat(char(x)));
Error in ==> RegionalTurboprop at 180
A_clr_opt = eval(solve(Equation))
I use the eval(solve())in a couple of more cases in my
code and only this one gives me an error. What's wrong?
"Alex " <alex.thomos@gmail.com> wrote in message
<fmkjoq$laf$1@fred.mathworks.com>...
> Hey,
> I am using the eval function in combination with the solve
> function, as can be seen in the following:
>
> syms x % Setting x as an unknown
> Equation = eta_p/(climb_rate_ms+(sqrt(OptimumWS)*sqrt
> (2/rho_sea)/((1.345*(x*e)^0.75)/CD_0^0.25)))-OptimumWP;
> A_clr_opt = eval(solve(Equation));
>
> (Matlab finds Equation to be equal to:
> Equation =
> 4/5/
> (1143/125+1914868778638812090507823564875/36630645762454402
> 33426508578816*33^(1/4)*40^(3/4)/x^(3/4))-
> 3969249135925473/36028797018963968 )
>
> However, I get the following error message:
>
> ??? Error: This statement is incomplete.
>
> Error in ==> sym.eval at 9
> s = evalin('caller',map2mat(char(x)));
>
> Error in ==> RegionalTurboprop at 180
> A_clr_opt = eval(solve(Equation))
>
> I use the eval(solve())in a couple of more cases in my
> code and only this one gives me an error. What's wrong?
>
> Thanx in advance,
> Alex
If your Equation has not any analytical solution, the output of
function 'solve' is empty, and the function 'eval' will return
this error.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.