logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
StatAnalytica ExpertPolitical science
(5/5)

914 Answers

Hire Me
expert
Bryan ThomsonPsychology
(5/5)

907 Answers

Hire Me
expert
Dick BentleyEnglish
(5/5)

977 Answers

Hire Me
expert
Siddharth GuptaStatistics
(/5)

591 Answers

Hire Me
MATLAB
(5/5)

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.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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)

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

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

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme