Why calculation with using matrix is different from manual calculation?

3 次查看(过去 30 天)
Re=10^5:10^5:10^6;
C_D = 24./Re + (2.6.*(Re./5))/(1+(Re./5.0).^(1.52))+(0.411*(Re./263000).^(-7.94))./(1+(Re./263000).^(-8))+(0.25*Re./(10^6))/(1+Re./(10^6))
the result above the code is
C_D =
0.4871 0.4629 0.2064 0.1135 0.1017 0.0998 0.0994 0.0993 0.0992 0.0992
In this code, when Re is 10^6, C_D is 0.0992.
But, I calculate Re=10^6 in manual
the result of C_D value is 0.1296
>> Re=10^6
Re =
1000000
>> C_D = 24./Re + (2.6.*(Re./5))/(1+(Re./5.0).^(1.52))+(0.411*(Re./263000).^(-7.94))./(1+(Re./263000).^(-8))+(0.25*Re./(10^6))/(1+Re./(10^6))
C_D =
0.1296
Why this problem happen?
And can I solve this problem?

采纳的回答

KSSV
KSSV 2020-5-18
编辑:KSSV 2020-5-18
YOu have missed . in some places, check the below corrected line:
Re=10^5:10^5:10^6;
C_D = 24./Re + (2.6*(Re/5))./(1+(Re/5.0).^(1.52))+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/(10^6))./(1+Re/(10^6)) ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dynamic System Models 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by