1. a) Write the Matlab command for generating a vector ‘X where the elements form a class of arithmetic progression from -5 to 5 with step size 0.1. (3pts)
b) How many elements are there in the vector? In Matlab what command would you use to obtain the length of the vector? (2pts)
c) Is the vector row vector or column vector? (2pts)
d) What are the results for the commands “ x*x’ ” and “ x.*x ”? (If the result is too long, you can describe it with your words.) Why? Give the Matlab command for plotting . (3pts)
2. The following is a Matlab script to solve for the root of
clear all;
close all;
syms x;
f=@(_)_________________;
a=-1;
b=1;
tol=_________________;
error=1;
m=1;
while(__________)
mo=m;
m=(a+b)/2;
if(f(a)*f(m)<0)
b=m;
else
a=m;
end
error=______________;
end
a) What method is used in this code? Is this a bracketing method or an open method? (2pts)
b) Fill in the blanks. (8 significant figures) (9pts)
c) What is the result from this code? (1pts)
3. Create a hypothetical floating-point number set for a machine that stores information using 15-bit words. Employ the first bit for the sign of the number, the next six for the sign and the magnitude of the exponent, and the last eight for the magnitude of the mantissa. a) Under this definition, what is 101001011010100 in decimal format? Show the details of your calculation. (5pts)
b) What is the smallest possible positive floating-point number under the above definition? (5pts)
c) What is the machine epsilon? (3pts)
4. Use 4-digit and 5-digit arithmetic with chopping, evaluate the roots of the expression with the following equation employed, compute the relative errors. (20pts)
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme