Help with code please?
이전 댓글 표시
Hello all, I have the following attempt...
clc
clear
Re=linspace(2300,40000,100);
ed=0.058887;
relr=ed;
dfTol=5e-6;
ft= (1./(-1.8*log10(((ed/3.7)^1.11)+(6.9./Re)))).^2;
for ii=ft;
jj=Re;
cole=@(f,ed,Re) 1/sqrt(f)+2*log10((ed/3.7)...
+(2.51./Re*sqrt(f)));
f(ii) = fzero(cole,ii,optimset('TolX',dfTol,'Display','off'),relr,Re);
end
plot(fric)
I want to find the value of 'f' at each value in 'Re' and plot this against 'Re'. I am using 'ft' as the estimation point for fzero and am not sure how to get this to work. I apologize if my coding is terrible, I am a beginner at matlab and am not very good. Any help would be much appreciated. Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!