CS101 - Lab Activity 3
Name:
____________________
NetID: ______________ Section#: ______
Name:
____________________
NetID: ______________ Section#: ______
Name:
____________________
NetID: ______________ Section#: ______
Objectives
In this lab, you will:
- Understand the difference between MATLAB functions and scripts.
- Learn to use function parameters and return values.
- Design and code the ex function for a hand calculator.
References
- Lecture 2.
- MATLAB Help: Using MATLAB
Programming
and
Data Types
M-File Programming.
- MATLAB Help: Using MATLAB
Mathematics
Matrices and Linear Algebra.
- Matlab by Pratap Chapter 4.2, 4.3 ,5.3 ,6.1.
Part 1 : Matlab Functions
- ______________________________________________________________________________________
- ______________________________________________________________________________________
- Y / N
- Y / N
- ___________________________________________
- ___________________________________________
- ___________________________________________
- _________________________________________________________________
_________________________________________________________________
_________________________________________________________________
- ______________________________________________________________________________________
- ______________________________________________________________________________________
Part 2 : Kinetic Energy of a particle
-
____________________________________________________________________________________
-
____________________________________________________________________________________
- ____________________________________________________________________________________
- ____________________________________________________________________________________
-
____________________________________________________________________________________
_____________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
Part 3 : Writing
your own function
- _________________________________________________________________________________
- _____________________________________________________________________________________________________________
- _____________________________________________________________________________________________________________
- _____________________________________________________________________________________________________________
- TA signature
__________________________________________________________________
Part 4 : Absolute and Relative Error
- temp =
______________________________________________________________________
- temp2 =
_____________________________________________________________________
- y =
_________________________________________________________________________
-
TRUE
FALSE