You are on page 1of 3

NumCE

Numerical Methods, Lab


LABORATORY

Name: LAB 01 Rating


Hans Anthony Lim GNU Octave Familiarizzation

Date:
February 10, 2023

I. PROBLEMS

II. Octave Source Code

p1 = [1 7 0 2 1 3]
p2 = [3 1 3 2 2 1]
p3 = [4 0 3 2 1 3]

roots_p1 = roots(p1) %roots of p1

p4 = p3.*p2 %multiplying p3 and p2 and display the value

p5 = p3./p2 %dividing p3 and p2 and display value


III. RESULTS

IV. INTERPRETATION
For the values of p1, p2, and p3, the missing variables are
substituted with zero, such as the ‘zero’ after 7 in p1, since
there is no value for s4.

The various commands for such as finding the roots, division


and multiplication can be found through GNU Octave’s list of
arithmetic commands and their documentation on finding the roots,
which can be found in their manual online.

https://docs.octave.org/v5.2.0/Arithmetic-Ops.html
https://docs.octave.org/v7.3.0/Finding-Roots.html
V. RATING

Criteria Score
Ability to prepare a well
written report
Ability to write a
computer program to solve
an engineering problem
Ability to interpret the
results correctly

You might also like