subject

Write a MATLAB program to read in numbers from a file one at a time until a negative even number is read in or there are no numbers left to be read. Calculate the average of the numbers that were read in, not including the negative even number. The program will display this average along with the number of numbers used to determine it. Remember to account for the case where the first number read in is a negative even number. Use the three input files provided on Blackboard to test your program.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
You know the right answer?
Write a MATLAB program to read in numbers from a file one at a time until a negative even number is...
Questions
question
Mathematics, 08.09.2021 05:10
question
Mathematics, 08.09.2021 05:10
question
Mathematics, 08.09.2021 05:10
question
Biology, 08.09.2021 05:10
Questions on the website: 13722367