Effacer les filtres
Effacer les filtres

if 구문에서 데이터값이 계산한 값과 다르게 나옵니다.

1 vue (au cours des 30 derniers jours)
GeonWoo Jeon
GeonWoo Jeon le 27 Sep 2019
v = 0.1 : 0.1 : 2
re = (mediandiamter * 10^-6 * v * fdensity ) / vicosity ;
if ( re < 2.0 )
cd = 24 * (re.^(-1))
elseif ( 2<= re <= 500 )
cd = 19 * (re.^-(0.6))
else
cd = 0.4 * (re.^(-0))
end
여기서 fdensity, vicosity, mediandiamter는 상수며 첫번째 re값이 0.5996 이 나왔습니다.
그렇게되면 첫번째 cd값은 re가 2보다 작으므로 24 * 0.5996^-1 의 결과인 40.0266이 나와야되는데 매트랩상에서는 25.9가 찍힙니다.
어디부분이 잘못된걸까요 ??

Réponses (1)

SaiDileep Kola
SaiDileep Kola le 25 Mar 2021
I don't see anything wrong in the posted code, may be the values of other constant parameters or using re as vector and element might be problem try using index like re(i).

Catégories

En savoir plus sur 모델링 dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!