Question 1 (a) (1) What is the difference between clc and clf commands? (2) What is the purpose of using the colon (:) in matrix subscripts? (3) Having two vectors a and b, what is the difference between a / b and a. /b? (4) What is the difference between x = [-1; 0; 5] and y = [-1 0 5]? (5) Which of the following is wrong command? >> Y=3; >> *Ya= i; >>HE is = 6; >>1ST = 3. State the reason for your answers. (6) Given z = [2 i 2; i i 2i; 0 1 i], without using MATALB, what will be the type and the size of the matrix q, where q-z*inv(z)? (7) Given baby = [b a by], babyT = [b; a; b; y], case_1=baby*babyT, and case_2= babyT*baby. Is case_1 = case_2? State the reason of your answer? (8) What is the purpose of the fprintf function in Matlab? (9) Distinguish between the array division and the matrix division. (10) What is the purpose of docking a window in Matlab? (b) Develop a Matlab function to compute the sum of even numbers of 200≤x≤1000. Call the function from the Matlab command window and show the sum. You need to show the Matlab program. (c) Given the following functions my_e= (1+1/2)² EulerNumber = e (1) Write an M-code in Matlab to calculate the value of the function my_e for z between 1 and 1000 and plot the result labelling x and y axis and title. You need to show the M-code and the figure plotted. (2) What is the value of my_e(1000)? (3) Compare my_e(1000) with e, what you conclude? (d) Economic formulas are available to compute annual payments for loans. Suppose that you borrow an amount of money M and agree to repay it in n annual payments at an interest rate of i. The formula to compute the annual payment An is: i(i + 1)" An = M (i+1)n-1 Write a Matlab program to compute An. Test it with M = $100,000 and an interest rate of 2.2% for 10 years. Show M-code and the results obtained.

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
Question 1
(a) (1) What is the difference between clc and clf commands?
(2) What is the purpose of using the colon (:) in matrix subscripts?
(3) Having two vectors a and b, what is the difference between a / b and a ./b?
(4) What is the difference between x = [-1; 0; 5] and y = [-1 0 5]?
(5) Which of the following is wrong command?
>> Y=3; >> *Ya= i; >>HE is = 6; >>1ST = 3. State the reason for your answers.
(6) Given z = [2 i 2; i i 2i; 0 1 i], without using MATALB, what will be the type and the size
of the matrix q, where q=z*inv(z)?
(7) Given baby = [b a by], babyT = [b; a; b; y], case_1=baby*babyT, and
case_2 = babyT*baby. Is case_1 = case_2? State the reason of your answer?
(8) What is the purpose of the fprintf function in Matlab?
(9) Distinguish between the array division and the matrix division.
(10) What is the purpose of docking a window in Matlab?
(b) Develop a Matlab function to compute the sum of even numbers of 200≤x≤1000. Call the
function from the Matlab command window and show the sum. You need to show the
Matlab program.
(c) Given the following functions
my_e= (1+1/z)²
EulerNumber = e
(1) Write an M-code in Matlab to calculate the value of the function my_e for z
between 1 and 1000 and plot the result labelling x and y axis and title.
You need to show the M-code and the figure plotted.
(2) What is the value of my_e(1000)?
(3) Compare my_e(1000) with e, what you conclude?
(d) Economic formulas are available to compute annual payments for loans. Suppose that you
borrow an amount of money M and agree to repay it in n annual payments at an interest rate
of i. The formula to compute the annual payment An is:
An =
i(i + 1)n
(i+1)n-1
-M
Write a Matlab program to compute An.
Test it with M= $100,000 and an interest rate of 2.2% for 10 years.
Show M-code and the results obtained.
Transcribed Image Text:Question 1 (a) (1) What is the difference between clc and clf commands? (2) What is the purpose of using the colon (:) in matrix subscripts? (3) Having two vectors a and b, what is the difference between a / b and a ./b? (4) What is the difference between x = [-1; 0; 5] and y = [-1 0 5]? (5) Which of the following is wrong command? >> Y=3; >> *Ya= i; >>HE is = 6; >>1ST = 3. State the reason for your answers. (6) Given z = [2 i 2; i i 2i; 0 1 i], without using MATALB, what will be the type and the size of the matrix q, where q=z*inv(z)? (7) Given baby = [b a by], babyT = [b; a; b; y], case_1=baby*babyT, and case_2 = babyT*baby. Is case_1 = case_2? State the reason of your answer? (8) What is the purpose of the fprintf function in Matlab? (9) Distinguish between the array division and the matrix division. (10) What is the purpose of docking a window in Matlab? (b) Develop a Matlab function to compute the sum of even numbers of 200≤x≤1000. Call the function from the Matlab command window and show the sum. You need to show the Matlab program. (c) Given the following functions my_e= (1+1/z)² EulerNumber = e (1) Write an M-code in Matlab to calculate the value of the function my_e for z between 1 and 1000 and plot the result labelling x and y axis and title. You need to show the M-code and the figure plotted. (2) What is the value of my_e(1000)? (3) Compare my_e(1000) with e, what you conclude? (d) Economic formulas are available to compute annual payments for loans. Suppose that you borrow an amount of money M and agree to repay it in n annual payments at an interest rate of i. The formula to compute the annual payment An is: An = i(i + 1)n (i+1)n-1 -M Write a Matlab program to compute An. Test it with M= $100,000 and an interest rate of 2.2% for 10 years. Show M-code and the results obtained.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,