1. Engineering
  2. Mechanical Engineering
  3. i figured out how to do part b but i...

Question: i figured out how to do part b but i...

Question details

Problem 2: MATLAB Practice (10 points) (a) Write the MATLAB script that does the following steps (a) Create an array A of 20 zeros (b) Pit a l in the second entry in the array, iL.Ά|-10, 1.0 . 0] For example A(3) AI)+A(2 and A(4) A(2) A(3). (d) Display the final result along with the name of this famous sequence of numbers (b) Create n line plot of the functions y sin(n) and y cos(a) on the interval a [ π.π1 with 1000 grid points. Label your axes, adjust the font size so the figure looks good, add a legend with line types that easily distinguishable (c) Write a MATLAB function that takes the input of a number and the integer n, output the number rounded on the neh digit to the nearest number. For example, round 3.11159 with n 2 should restult in 3.14 or round 6.2832 with3 should result in 6.283. Assume you have access to a simple round function that can round to the nearest integer. Turn in a to class a pruted copy of a MATLAB t (e.g., figures). Also, upload your code to the assignment folder on D2L. Be sure your code as comments explaining what is being done, as this is good programming practice. code that performs the actions above and copies of the outpu

I figured out how to do part (b), but I don't understand how to do parts (a) and (c) in matlab code?

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution