Kedy Jan Cuanan Cengr 3140 LR1 1
Kedy Jan Cuanan Cengr 3140 LR1 1
Kedy Jan Cuanan Cengr 3140 LR1 1
OBJECTIVE:
a. Learning how vectors and matrices are assigned values using simple
assignment, the colon operator, and the linspace functions.
b. Gaining a general understanding of built-in functions of GNU Octave.
c. Learning how to use vectors to create a simple line plot based on an equation.
EQUIPMENT:
a. Personal computer
PROCEDURES:
The velocity of a free-falling bungee jumper can be computed with the equation:
v=√ ❑ [Eq. 1]
where g is the acceleration due to gravity (9.81 m/s2), m is mass (kg), c d is the drag
coefficient (kg/m), and t is time (s).
Data for the mass and associated terminal velocities of a number of jumpers is given
below.
Drag coefficient can be computed using the equation involving the terminal velocity.
mg
cd= 2 [Eq. 2]
vt
a. Assign value to the acceleration due to gravity g.
b. Using Eq. 2, compute for the mean drag coefficient in GNU Octave.
c d =¿ ¿
i. Based on the results of v and the graph, estimate your terminal velocity to the
nearest tenths.
v t =¿ ¿
RESULTS:
(attach images of the GNU Octave command window, workspace, and/or graph
showing the inputs and the results of the above procedures)
GUIDE QUESTIONS:
1. In your opinion, what is the most useful function of GNU Octave and why?
The most useful function of this program is its capability to modify, arrange, and
convert, just like a modern calculator it provides the answers straight away. Though
it's better to understand what happens with each command prompted, this program
eases those tedious steps, from simple transforming arrays straight to plotting.
3. What could be done to improve the accuracy of the graph and the
determination of terminal velocity?
Having a pin system or symbol that shows every coordinate and their details
of coordination, will allow an easier way of comparing each or every coordinate to
one another.
4. For you, what is the most crucial part of using GNU Octave as a tool in
performing mathematical calculations?
Understanding how the formula or the actions are being performed, like not
just knowing the answer of 1+1, one must know why the answer of 1+1 is this or that.
CONCLUSION:
Octave is a fun way of calculating problems. It provides many tools that help
people make their way to obtaining the results they are looking for. This is just like
programming, where an action always has a value and is always considered in the
following commands if it is part of the next equation to tackle. Unlike our traditional
calculator, this provides a wider range of functions, being able to use variables, give
values to words, etc. with the proper understanding of the program and mastery of
commands, this will be a good weapon to tackle problems.
PRACTICE PROBLEMS:
1. Use the linspace function to create vectors identical to the following created
with colon notation:
a. t = 4:6:61
b. x = -4:4
2. The following matrix is entered in Octave:
>>A=[1 2 5;0:0.5:1;linspace(6,8,3)]
a. Write out the resulting matrix.
b. Write a single-line command to multiply the second row by the third
column and assign the result to the variable c. Hint: To pertain to a single
row or column in a matrix, input the matrix name followed by (▢,▢). Input the row
number if pertaining to a row then a colon [e.g. A(1,:) to pertain to the first row of
matrix A] and input the column number if pertaining to a column then a colon [e.g.
A(:,1) to pertain to the first column of matrix A].
F (N) 14 18 8 9 13
Use Octave to store F and x as vectors and then compute vectors of the
spring constants and the potential energies. Use the max function to
determine the maximum potential energy.
t (min) 10 20 30 40 50 60