0% found this document useful (0 votes)
12 views2 pages

Ass1 Qu2

Answer solution

Uploaded by

maheshsahoo613
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Ass1 Qu2

Answer solution

Uploaded by

maheshsahoo613
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment Number: 1

Q 2.

Problem Statement:

The distance travelled by a ball falling in air is given by the equation x= X0+V0*T+1/2at^2. Use
MATLAB to calculate the position if the ball at time T=5sec, X0=10m, V0=15m/m, a=
-9.8m/sec^2 .

Inputs:

T=5sec, X0=10m, V0=15m/sec, a=9.8m/s^2.

Outputs:

X= position of the ball.

Program :

% Script File: assignment 1


% Purpose: Determine the position of ball
by the equation x= X0+V0*T+1/2at^2
% Record of Revision:
% Name- Mahesh Kumar sahoo Registration Number- 2341019194
% Variable declaration :
% Input Variables :
% Xo= initial of position of the ball
%Vo= initial velocity of the ball
% A= acceleration of the ball
% T= time
% Output Variable :
% X-position of the ball

% Prompt the user to enter inputs


clc; clear all; close all;
X0= input('enter the value of X0');
V0= input('enter the value of V0');
A=input('enter the value of a');
t= input('enter the value of t');
x=X0+V0*t+.5*a*t^2;
disp(X) ;

Test Results:

enter the value of xo:10


enter the value of vo:15
enter the value of a:-9.81
enter the value of t:5
-37.6250

>> Therefore the position of the ball x is -37.6250

You might also like