%calculating drag force against a cyclist and plotting drag force vs velocity
close all
clear all
clc
%drag coefficient
c_d = 0.80
%Area
A = 0.0123
%Velocity
v = [1:25]
%Density
rho = 1.20
drag_force = rho*A*v.*v.*c_d*0.5
%plotting drag_force vs velocity
plot(v,drag_force,\'linewidth\',3)
xlabel(\'velocity\')
ylabel(\'Drag_force\')
%calculating drag force against a cyclistand plotting drag force vs drag coefficient
close all
clear all
clc
%drag coefficient
c_d = linspace(0,0.85,100)
%Area
A = 0.0123
%Velocity
v = 25
%Density
rho = 1.20
drag_force = rho*A*v*v*c_d*0.5
%plotting drag_force vs drag_coefficient
plot(c_d,drag_force,\'linewidth\',3)
xlabel(\'c_d\')
ylabel(\'drag_force\')