image thumbnail
from How Computer Models Help Break Records? by Coorous Mohtadi
Article on use of MATLAB to build a simplified model of the BLOODHOUND Super Sonic Car.

BloodhoundMission.m
%% BLOODHOUND Performance Example
% Copyright 2012 - 2012 The MathWorks Inc.
%
% This script calls the differential equation solver of MATLAB to compute
% the velocity profile of the car
%% Setup the Model and Initialise all the variables and states
% Set B_Car as an instance of the Bloodhound (This will set the initial
% parameters in the properties of the B_Car object
B_Car = Bloodhound; 
B_Car.BloodhoundEQ(0,[0;0]);
% Setup the Maximum Step size for the solver
options = odeset('MaxStep',0.1); % maximum of 0.1 seconds interval

%% Obtain the simulation profile
% Call the Ordinary Differential Equation Solver. Write the result of the time steps and the speed in Tout, and Yout
% matrices
[Tout, Yout]=ode45(@B_Car.BloodhoundEQ,[0 70],[0;0],options);
%% Plot The results
% Call the plot results script to plot the simulated performance graph
plotresults; % Plot the results calling the plot results script

Contact us