Can't get my code to execute
显示 更早的评论
So I was given this question to work on.

I tried to work on the code into mathlab and plot the graph but can't seem to execute and have no idea where go wrong. This is what I have for now.
Any help is appreciated, thank you.
A=1.325;
B=3.7;
C=5.74;;
D=[10.^-6:10.^-2] %Relative Roughness range
E=[108:4000]; %Reynolds number
f=A/log((1/3.7)*D+(C/E.^0.9)).^2; %Given Swamee-Jain formula
figure(5);
plot(D, f);
xlabel('Reynolds Number');
ylabel('Friction Factor f');
title('Friction Factor against Reynolds Number');
grid on
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
