Drag Force variation wrt drag coefficent and velocity
%drag force on the cyclist
clear all;
close all;
clc
%inputs
%drag coefficent
cd = 0.8;
%area m^2
a= 0.1;
%velocity m/sec
v = [1:100];
%density kg/m^3
rho =1.225;
%calculations
dragforce = (cd * a * v.^2 * rho *0.5);
plot(v,dragforce,\'color\',\'r\');
xlabel(\'velocity\');
ylabel(\'dragforce\');
%drag foce on different shapes with same velocity and area but different drag co-efficents
%shapes flatplate prism bullet sphere airfoil
cd1 = [1.28 1.14 0.295 0.5 0.045];
%fixed velocity
v1 = 5;
dragforce1 = rho * a * v1^2 * cd1.^1 * 0.5;
figure;
plot(cd1,dragforce1);
xlabel(\'drag-coefficent\');
ylabel(\'dragforce\')