Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB The file testscores.dat (testscores.txt) has on each line a student ID# and a test score. Write a program to read in the scores and

MATLAB

The file testscores.dat (testscores.txt) has on each line a student ID# and a test score. Write a program to read in the scores and use built-in MATLAB functions to determine the high, low, average (Ave), and the standard deviation (SD) of the scores. For each student, determine the grade assuming that the following table is used

Range Grade
Score >= Ave + 1.5*SD A
Ave + 1.5*SD > Score > =Ave + 0.5*SD B
Ave + 0.5*SD > Score > =Ave - 0.5*SD C
Ave - 0.5*SD > Score > =Ave - 1.5*SD D
Ave - 1.5*SD > Score F

Print out in a new file (FinalGrades.txt or FinalGrades.dat) the student ID and the corresponding letter grade only. Your program must work for any properly formatted file named testscores.dat/txt. The program will also provide a summary of the scores: Low, High, Average, Standard Deviation, and the number of each letter grade to the command window

Here is the values for testscores.txt

100014 88.3 100109 96.9 100205 69.9 100263 90.5 100269 86.9 100293 76.2 100329 81.9 100412 87.1 100414 108.4 100419 103.1 100436 75.9 100501 104.8 100575 89.6 100640 84.4 100686 89.5 100741 83.4 100771 84.0 100846 94.6 100865 94.1 100934 94.2 100953 89.2 100990 76.8 101053 89.5 101132 95.6 101141 88.0 101234 91.6 101312 89.6 101361 82.8 101405 86.7 101450 79.6 101481 90.7 101532 77.2 101584 77.7 101666 79.5 101746 65.4 101811 94.3 101849 86.9 101931 79.8 101985 93.8 102021 73.5 102115 84.1 102203 83.2 102259 86.9 102322 86.9 102381 79.1 102402 84.6 102433 83.7 102481 88.9 102505 92.0 102590 92.1 102610 79.1 102633 85.3 102651 76.8 102674 77.5 102718 84.8 102750 94.9 102843 79.7 102887 87.3 102906 83.3 102997 92.2 103095 77.6 103139 85.0 103151 88.4 103177 92.1 103218 95.0 103278 85.4 103305 75.0 103366 79.9 103438 77.8 103461 100.3 103473 80.7 103503 89.7 103535 83.5 103578 90.7 103629 79.8 103638 75.5 103665 75.4 103746 88.0 103749 83.6 103842 83.5 103916 94.2 103965 86.7 104023 86.1 104047 95.3 104093 79.5 104190 62.7 104245 63.6 104298 56.8 104322 59.7 104371 51.0 104434 51.1 104502 59.0 104542 62.9 104579 74.6 104678 54.1 104682 59.5 104771 57.8 104863 46.1 104943 55.5 104953 47.0 104980 63.6 105014 52.7 105082 58.9 105096 54.9 105169 60.2 105180 54.5 105246 61.4 105296 63.0 105374 69.1 105446 57.1 105537 44.8 105627 53.0 105661 66.8 105731 51.5 105751 64.4 105755 59.1 105830 67.4 105881 45.9 105929 57.1 106020 50.7 106081 76.6 106143 63.5 106229 67.0 106310 51.6 106368 55.3 106387 56.6 106411 65.2 106500 56.5 106503 62.7 106552 45.4 106569 56.1 106667 53.1 106739 48.4 106790 61.5 106838 60.1 106844 58.5 106913 49.9 106918 65.4 106926 60.5 106979 56.4 106989 58.4 107071 56.6 107153 47.3 107226 56.5 107241 53.1 107307 52.1 107359 51.0 107457 54.9 107522 45.7 107603 64.4 107649 61.6 107693 58.2 107776 58.1 107785 53.3 107799 64.7 107817 57.5 107857 53.8 107941 66.8 108022 56.9 108029 54.6 108069 56.4 108122 53.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions