I write Matlab commands to produce a vector r containing the following sequence
ID: 3145822 • Letter: I
Question
I write Matlab commands to produce a vector r containing the following sequence of numbers: (a) 2,4,6,8, 10,...,50. (b) 500 numbers, evenly spaced, starting with 3 and ending with 8 in space (3.8. So X (c) 1,4,9, 16....400, i.e., the first 20 square nunbers. 2. Suppose ttt. ] is a vector. Write a Matlab command that creates the vector -|f(t1) J(t2) /(t")| where (a) (x) 2r3-4 (b) /(z)= rsin(12) (c) f(z)= evin (d) /(z) = manlike 3. Assume that a, b and e are vectors with 10 entries. Underline the correct Matlab expressions that are equivalent to a./b./c (c) a/b/c . Let f(x)-16-4r +2 (a) Write Matlab commands to find the zeros of f. (b) What are the real roots of f(e) (accurate to 4 decimal places)? (c) What are the complex roots of f(x) (accurate to 4 decimal places)? 5. Consider the function f(x)- (a) Write Matlab commands to plot this function with sufcient precision to make it look smooth i. What command(s) do you use to create the x-values? ii. What command(s) generate the y-valnes? ili. What comhand(s) plot the function? (b) How many zeroes does the function have? 6. Use Matlab to find the point(s) of intersection (if any) between the functions f(xr) 10sin(2r +5) and rite down the Matlab commands to produce the x-vector, g(z) 6r--4, accurate to two decimal places. W the vectors representing the f- aud g-values and the plot of the graphs. 7. Use Matlab to find the minimum (accurate to two decimal places) of the function f(x) = cos x + ( in the interval (0,).Explanation / Answer
1)
a)
x = linspace(2,50,25)
b)
y = linspace(3,8,500);
c)
z = 1:20;
s = z.^2 ;
s is required vector
Please post next question again, you can ask only 1 question at a time