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

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

expert
Peter BernerGeneral article writing
(5/5)

924 Answers

Hire Me
expert
Haneef MahomamadManagement
(5/5)

675 Answers

Hire Me
expert
Brayden JamesComputer science
(5/5)

835 Answers

Hire Me
expert
Connorr EvansEngineering
(5/5)

960 Answers

Hire Me
MATLAB
(5/5)

How many elements are there in the vector? In Matlab what command would you use to obtain the length of the vector?

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Please directly write down your answers after each subproblem in this document, your answers should be in blue color. 

Before you send this back to me, change the document name to “Midterm_LASTNAME_Firstname.docx”. You can send your midterm to my email: liugeng.5202004@gmail.com, the subject of your email should be “Midterm_LASTNAME_Firstname”.

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 y=x^2. (3pts)

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)

 

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)

Use 4-digit and 5-digit arithmetic with chopping, evaluate the roots of the expression x^2-100.02x+2 with the following equation employed, compute the relative errors. (20pts)

  Give the flowchart for finding the root of the function

f(x)=[tanh⁡(x-2)][sin⁡(x+3)+2]

with the following methods (6 significant figures required):

Modified Regula Falsi (Choose two reasonable integers as your initial upper and lower bounds, 10pts)

Newton’s Method (Choose one reasonable integer as your initial guess for the root, 10pts)

Solve the following equations set 

f_1 (x_1,x_2 )=sin⁡(x_1 )+x_2

f_2 (x_1,x_2 )=x_1+e^(x_2 )

Can this equation set be solved by the fixed -point method with the following expressions? And why? Show your analysis with a 2D graph. (15pts)

g_1 (x_1,x_2 )=-e^(x_2 )

g_2 (x_1,x_2 )=-sin⁡(x_1)

Use Newton Raphson Method with initial values x_1=-2,x_2=1.5. (8 significant figures. Please submit the code and results.) (10pts)

 

(5/5)
Attachments:

Expert's Answer

641 Times Downloaded

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