Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

-05.3 1. Suppose that x-0: .5:10. Show how the same vector x can be obtained usi

ID: 2887802 • Letter: #

Question

-05.3 1. Suppose that x-0: .5:10. Show how the same vector x can be obtained using the linspace command. Assume we do not want to display the output. Assume we do not want to displax (5 points) Answer 2. What command clears the current graphics screen? (5 points) Answer: 3. If x-[1 2 3 4], express the entries in (x.^x) .*x using standard mathematical notation. (You do not have to work out the numerical value of each entry.) (5 points) Answer: 4. You want to display a data plot whose points are drawn with a red circle, and which has a red line joining successive points. What line specification string should you enter in the plot command in order to do this? (Include the appropriate punctuation for designating a string.) (5 points) Answe: l of4 Math 203MM Lab Final 2 F12 5. Create a vector whose entries are the points that divide the interval [-?,?] into 10 equal subintervals? (5 points) Answer: ry 6. State the command that constructs f(x,y)- as an anonymous vectorized function of two variables. (5 points)

Explanation / Answer

solution of question no. 1 using matlab:

>> x=0:.5:10

x =

Columns 1 through 5

0 0.5000 1.0000 1.5000 2.0000

Columns 6 through 10

2.5000 3.0000 3.5000 4.0000 4.5000

Columns 11 through 15

5.0000 5.5000 6.0000 6.5000 7.0000

Columns 16 through 20

7.5000 8.0000 8.5000 9.0000 9.5000

Column 21

10.0000

----------------------------------------------------------------------------------------------------------------------

>> y=linspace(0,10,21)

y =

Columns 1 through 5

0 0.5000 1.0000 1.5000 2.0000

Columns 6 through 10

2.5000 3.0000 3.5000 4.0000 4.5000

Columns 11 through 15

5.0000 5.5000 6.0000 6.5000 7.0000

Columns 16 through 20

7.5000 8.0000 8.5000 9.0000 9.5000

Column 21

10.0000

------------------------------------------------------------------------------------------------------------------------------------------------

hence both x and y vectors are same where y vector is created using linspace command in matlab.

y=linspace(0,10,21) command generates a row vector y of 21 points linearly spaced between and including 0 to 10