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

1 visualización (últimos 30 días)
GeonWoo Jeon
GeonWoo Jeon el 27 de Sept. de 2019
Respondida: SaiDileep Kola el 25 de Mzo. de 2021
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가 찍힙니다.
어디부분이 잘못된걸까요 ??

Respuestas (1)

SaiDileep Kola
SaiDileep Kola el 25 de Mzo. de 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).

Categorías

Más información sobre 모델링 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!