Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NAME: LAB SECTION: HW3P2 (18 points) Element by Element Operations: Solve this problem in a new script file HW3P2.m. Give a title to each section
NAME: LAB SECTION: HW3P2 (18 points) Element by Element Operations: Solve this problem in a new script file HW3P2.m. Give a title to each section using a comment line. A. (6 pts) Use the : operator to create the vectors a [5,4,3, 2,1] and bI-5,-4,-3,-2,-1]. Then use the vectors a or b or both in a MATLAB expression to create the following vectors. Do Not write the elements explicitly. @c= [-25-16-9-4-1] (ii) d = [5-54-43-3 2-2 1-1] (ii) e = [-1-1-1-1-1] (iv) f = -4 Hint: Use element by element operations. B. (4 pts) Use the operator to create the vectors x-[2.5,1.5,0.5,-0.5,-1.5] and y 10.4,0.8, 1.2, 1.6,21, then use them in the following expression to compute vector z using element-by-element calculations z = x?y ey(x-4.jx3y +72.61 (8 pts) A 70 lb bag of rice is being pulled by applying a force F at an angle as shown. The force required to drag the bag is given by: C. 70 u sin 0 + cos 0 Where u 0.35 is the friction coefficient. Determine: (a) (3 pts) Ra for .-0, 5, 10, 15, 20, 25, 30, 35, 40, 45. Enter the variable theta as a vector using the : operator. (b) (5 pts) the angle 0 where F is minimum. Do it by creating a vector 0, with elements ranging from 0 to 45 and spacing of 0.01. Calculate Fb for each value of b and then find the minimum F and the associated with MATLAB's built-in function min0. Write the command plot (theta b, F_b) at the end of your script to plot Fb versus b. Hint from the help of min function: [Y, 1] mn (X) returns the index 1 of the minimum value in a vector x If the values along x contain more than one minimal element, the index of the first one is returned
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started