{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# HW6 - Homework#6 For Loops Reading 4.2(Ignore 4.2.2...

This preview shows pages 1–2. Sign up to view the full content.

Homework #6: For Loops Reading: 4.2 (Ignore 4.2.2) Homework: This assignment will be done entirely in MATLAB. When asked for a “program” you should create an m-file (script). Be sure to turn-in the completed script along with any runs you are asked for. In addition, you need a flow diagram for each program. Turn problems in IN THE ORDER THEY ARE ASSIGNED. Each problem needs to be labeled so the TA can find your work. Do the following exercises from your textbook 1. 4.5 Test your code for N = 5 , - 1 , 3 . 6 and 60. Also, determine the maximum value of N such that MATLAB will calculate a value. To prove your result, show the final value that gives a numerical result and show the next value yields “Inf.” Write a MATLAB script (m-file) that 2. Calculates the arithmetic mean, geometric mean, root-mean square and the harmonic mean for a data set x . The means are given by the following equations: arithmetic mean = 1 N N X i =1 x i geometric mean = ( x 1 x 2 · · · x n ) 1 /N root-mean square = v u u t 1 N N X i =1 x 2 i harmonic mean = N

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern