Question: Use MATLAB to define: x= 1, 1.2, 1.4, , 5 a. Compute the array y that results by applying the function: y= 7sin(3x) to every
Use MATLAB to define: x= 1, 1.2, 1.4, …, 5
a. Compute the array y that results by applying the function: y= 7sin(3x) to every element in x. (1 point)
b. Determine how many elements y has; save the result in w1. (1 point)
c. Display the values of elements from 3 to 9 (inclusively) of y, and save the result in array w2. (1 point)
3. Use MATLAB to generate:
a. Array z1= sin(-pi/2) : 0.05: cos(0) using colon operator; then determine how many elements it contains and save the result in T1. (2 points)
b. Array z2=[0 2 4 6 8; 1 3 5 7 9]using colon operator; then determine how many elements it contains and save the result in T2. (2 points)
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
clcclear allformat compactformat short Question 1 X1025 Creating ... View full answer
Get step-by-step solutions from verified subject matter experts
