Project

Matlab program to calculate drag force against a cyclist

%Finding drag force for bicycle
clear all
close all
clc

%inputs
%drag coefficient range for different shapes
cd=[0.3:2.5]
%drag coefficient for a particular shape
c_d=0.7
%density (kg/m^3)
d=1
%frontal area (m)
A=0.1
%velocity (m/s)
V=1.2
%velocity range (m/s)
v=[1:10]
%drag force for different drag coefficients at a particular velocity V(kg m/s^2)
Fd=0.5*d*A*V^2.*cd
%drag force for different velocities for a particular drag coefficient(kg m/s^2)
F=0.5*d*A*v.^2*c_d
%Plotting
hold on
%plot for drag force as a function of drag coefficient
plot(Fd,cd,\'linewidth\',3)
%plot for drag force as a function of velocity
plot(F,v,\'linewidth\',3)

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.