Concept explainers
Write the MATLAB code necessary to create the variables in (a) through (d) or calculate the vector computations in (e) through (q). If a calculation is not possible, explain why. You may assume that the variables created in parts (a) through (d) are available for the remaining computations in parts (e) through (q). For parts (e) through (q) when it is possible, determine the expected result of each computation by hand.
a. Save vector [3 –2 5] in va
b. Save vector
c. Save vector [9 –4 6 –5] in vc.
d. Save vector
e. Convert vd to a row vector and store in variable ve.
f. Place the sum of the elements in Va in the variable S1.
g. Place the product of the last three elements of vd in the variable P1.
h. Place the cosines of the elements of vb in the variable c1. Assume the values in vb are angles in radians.
i. Create a new 14-element row vector V19 that contains all of the elements of the four original
j. Create a two-element row vector v2 that contains the product of the first two elements of vc as the first element and the product of the last two elements of vc as the second element.
k. Create a two-element column vector v2A that contains the sum of the odd-numbered elements of vc as the first element and the sum of the even-numbered elements of vc as the second element.
l. Create a row vector ES1 that contains the element-wise sum of the corresponding values in vc and vd.
m. Create a row vector DS9 that contains the element-wise sum of the elements of vc with the square roots of the corresponding elements of vd.
n. Create a column vector EP1 that contains the element-wise product of the corresponding values in va and vb.
o. Create a row vector ES2 that contains the element-wise sum of the elements in vb with the last three elements in vd.
p. Create a variable s2 that contains the sum of the second elements from all four original vectors, Va, vb, vc, and vd.
q. Delete the third element of vd, leaving the resulting three-element vector in vd.

Want to see the full answer?
Check out a sample textbook solution
Chapter 15 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Solve this problem and show all of the workarrow_forwardSolve this problem and show all of the workarrow_forwarddraw the pneumatic circuit to operate a double-acting cylinder with: 1. Extension: Any of two manual conditions plus cylinder fully retracted, → Extension has both meter-in and meter-out, 2. Retraction: one manual conditions plus cylinder fully extended, → Retraction is very fast using quick exhaust valve.arrow_forward
- Correct answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you. Expert solution plsarrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forward
- Correct answer is written below. Detailed and complete solution only with fbd. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forward
- Correct answer is written below. Detailed and complete solution only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution with fbd only. I will upvote, thank you.arrow_forwardCorrect answer is written below. Detailed and complete solution only. I will upvote, thank you.arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY





