Assignment 3

# Assignment 3 - 3 Write a program calculates the average and...

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

Assignment #:3 Due date: 6/22/2009 Name: Maria Bobadilla Problem #:1 4.7 a) 4,7 runs twice b) 10,18,17, runs 3 times c)10,18,22,10,8, runs 5 times d) 0 times 4.8 a)0 times b)4,16,256, runs 3 times c)0 tmes 4.9 a) [1 -2 3 -4; 5 -6 7 -8; 9 -10 11 -12] b) [0 0 0 0; 0 36 49 64; 81 100 121 144]

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

View Full Document
Assignment #: 3 Due date: 6/22/2009 Name: Maria Bobadilla Problem #: 2 Write a program that calculates the decibel level corresponding to power levels from1 to 20 watts Pseudo code/Approach: 1. Write the formula relating decibels and power levels 2. Create an interval from 1 to 20 in .5 watt increments 3. Use ii and log functions to create a script 4. output= plot of db vs power MATLAB code: (see attached) Results: (see attached)
Assignment #: 3 Due date: 6/22/2009 Name: Maria Bobadilla Problem #:

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.

Unformatted text preview: 3 Write a program calculates the average and geometric mean of a set of numbers Pseudo code/Approach: 1. Prompt the user to enter values in the format of an array 2. Read values using a while loop 3. exit while loop with negative integers 4. output=the geometric mean and average MATLAB code: (see attached) Results: (see attached) Assignment #: 3 Due date: 6/22/2009 Name: Maria Bobadilla Problem #: 4 Write a program the will accept any numbers and calculate the root-mean-square Pseudo code/Approach: 1. Prompt the user for the values; 2. Use a for loop to accept input; 3. Write a function representing and calculating the rms 4. output= rms for the given values MATLAB code: (see attached) Results: ( see attached)...
View Full Document

{[ snackBarMessage ]}

### Page1 / 4

Assignment 3 - 3 Write a program calculates the average and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online