Next: About this document ...
ESC 251 HW 12 Due: Oct. 1
Remember to indent the bodies of your IF-THEN and looping
- (8 pts) Write a MATLAB script that will do the following:
- Load the data file
hw12_1.dat into a vector x.
- Determine the number of elements in the vector x.
- Determine the total number of negative values and the total
number of positive values in the vector using a for loop.
- (5 pts) Consider the function
Write a MATLAB script that will generate a vector x
containing the elements from -20 to 20 in
steps of 1, then evaluates the function y for this vector using
a for loop.