how coding drag coefficient?

26 views (last 30 days)
Lilya
Lilya on 2 Aug 2016
Answered: YATIK SHAH on 14 Apr 2021
Hi all, I need kindly help to write a code to calculate drag coefficient as the attached figure.
thank you in advance
  2 Comments
Bob Thompson
Bob Thompson on 2 Aug 2016
Could you expand a little bit more on what you're looking for exactly? All I can determine from the information in the pic is that Cd = 0.0012.
Lilya
Lilya on 3 Aug 2016
The equation is in the first line, this is what I actually want. The wind speed values are in matrix which in form of u, v.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 3 Aug 2016
See if this does what you want:
tau = @(U10) 1.22.*[1.2E-3.*((4 < U10) & (U10 < 11)) + 1E-3*(0.49 + 0.065*U10).*((11 <= U10) & (U10 < 25))].*U10.^2;
x = linspace(0, 24.9);
figure(1)
plot(x, tau(x))
xlabel('\itU_{10}\rm')
ylabel('\bf\tau\rm')
grid
  8 Comments
Lilya
Lilya on 3 Aug 2016
Thank you very much for your help. I greatly appreciate it.

Sign in to comment.

More Answers (1)

YATIK SHAH
YATIK SHAH on 14 Apr 2021
tau = @(U10) 1.22.*[1.2E-3.*((4 < U10) & (U10 < 11)) + 1E-3*(0.49 + 0.065*U10).*((11 <= U10) & (U10 < 25))].*U10.^2;
x = linspace(0, 24.9);
figure(1)
plot(x, tau(x))
xlabel('\itU_{10}\rm')
ylabel('\bf\tau\rm')
grid

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!