Matlab Project
Matlab Project
Project
Projectile Motion Simulation in MATLAB
Project Team
Ali Rooman(23TL010)
Feroz Ali(23TL024)
Submitted to
Engr Shakeel Laghari
2. Objectives:
The primary objective of this project is to develop a MATLAB program that simulates the
trajectory of a projectile launched with a given initial velocity and angle. Additionally, we
aim to calculate and visualize key parameters such as range, maximum height, and time of
flight of the projectile.
3. Methodology:
The simulation is implemented using the following steps:
Accept input parameters from the user: initial velocity (V0), launch angle (theta), and
gravitational acceleration (g).
Convert the launch angle from degrees to radians for calculations.
Calculate the initial velocity components in the x and y directions.
Create a time array t from 0 to the time at which the projectile hits the ground.
Calculate the trajectory of the projectile using the equations of motion for uniform
acceleration.
Compute key parameters such as maximum height (H), range (R), and time of flight
(T).
Plot the trajectory of the projectile using MATLAB's plotting functions.
Display the results including range, maximum height, and time of flight.
5.Program Screenshots.
Script Editor
The code is written in the editor, then the compiler compiles it, and finally, one interacts with
it through the command window.
6. Conclusion:
In conclusion, the MATLAB simulation of projectile motion presented in this project serves
as a valuable tool for understanding and analyzing the motion of projectiles. By providing a
visual representation of the trajectory and computing key parameters, the simulation
enhances the learning experience and facilitates further exploration of projectile motion
concepts.
Command Window
Command window.
Interacting with the MATLAB program for projectile motion simulation occurs primarily
through the command window:
1. Initial Velocity: Users input the initial velocity (in m/s) of the projectile.
2. Launch Angle: The launch angle (in degrees) relative to the horizontal axis is
specified.
3. Gravitational Acceleration: Input is provided for gravitational acceleration (in m/s²).
Output Graph
The graph produced by the code will display the trajectory of the projectile in a Cartesian
coordinate system. The x-axis represents the horizontal distance traveled by the projectile,
and the y-axis represents the vertical distance.
6. Conclusion:
In conclusion, the MATLAB simulation of projectile motion presented in this project serves
as a valuable tool for understanding and analyzing the motion of projectiles. By providing a
visual representation of the trajectory and computing key parameters, the simulation
enhances the learning experience and facilitates further exploration of projectile motion
concepts.