Question

MATLAB Assignment help studentNames = ["Amy", "Flynn", "Barbara", "George", "Jonathan", "Isaac", "Cindy", "Hank", "Elaine", "Debbie"]; Test1...

MATLAB Assignment help

studentNames = ["Amy", "Flynn", "Barbara", "George", "Jonathan", "Isaac", "Cindy", "Hank", "Elaine", "Debbie"];

Test1 = [79, 71, 98, 68, 65, 97, 72, 68, 68, 82];

Test2 = [61, 94, 98, 66, 91, 90, 76, 86, 67, 88];

Final = [68, 84, 85, 90, 91, 85, 88, 80, 51, 72];

Modify this to answer the following question:

Who was the lowest scoring student on each exam?

Each question must be formatted like so:

the student name, and the output to file names “students.txt” in a complete sentence

. Use %s in print statements to print a string similar to the example:

fprintf(fileID, “student name is %s”, studentName);

0 0
Add a comment Improve this question Transcribed image text
Answer #1

studentNames = ["Amy", "Flynn", "Barbara", "George", "Jonathan", "Isaac", "Cindy", "Hank", "Elaine", "Debbie"];
Test1 = [79, 71, 98, 68, 65, 97, 72, 68, 68, 82];
Test2 = [61, 94, 98, 66, 91, 90, 76, 86, 67, 88];
Final = [68, 84, 85, 90, 91, 85, 88, 80, 51, 72];
[~,i]=min(Test1);
min_student_test1=studentNames(i);
[~,i]=min(Test2);
min_student_test2=studentNames(i);
[~,i]=min(Final);
min_student_final=studentNames(i);
studentName=[min_student_test1 min_student_test2 min_student_final];
fileID = fopen("students.txt",'w');
fprintf(fileID, "student name is %s \n", studentName);
fclose(fileID);

Add a comment
Know the answer?
Add Answer to:
MATLAB Assignment help studentNames = ["Amy", "Flynn", "Barbara", "George", "Jonathan", "Isaac", "Cindy", "Hank", "Elaine", "Debbie"]; Test1...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Coding language is Matlab Given a mock set of grades and names of students: studentNames =...

    Coding language is Matlab Given a mock set of grades and names of students: studentNames = ["Amy", "Flynn", "Barbara", "George", "Jonathan", "Isaac", "Cindy", "Hank", "Elaine", "Debbie"]; Test1 = [79, 71, 98, 68, 65, 97, 72, 68, 68, 82]; Test2 = [61, 94, 98, 66, 91, 90, 76, 86, 67, 88]; Final = [68, 84, 85, 90, 91, 85, 88, 80, 51, 72]; I need the following questions answered and coded out: a) “ If Test 1 and 2 were worth...

  • For the following task, I have written code in C and need help in determining the...

    For the following task, I have written code in C and need help in determining the cause(s) of a segmentation fault which occurs when run. **It prints the message on line 47 "printf("Reading the input file and writing data to output file simultaneously..."); then results in a segmentation fault (core dumped) I am using mobaXterm v11.0 (GNU nano 2.0.9) CSV (comma-separated values) is a popular file format to store tabular kind of data. Each record is in a separate line...

  • Need help with C++ assignment Assignment 1 and .txt files are provided at the bottom. PART...

    Need help with C++ assignment Assignment 1 and .txt files are provided at the bottom. PART A PART B Assignment 1 #include <iostream> #include <string> #include <fstream> #include <iomanip> #include <stdio.h> #include <ctype.h> #include <string.h> #include <algorithm> using namespace std; /** This structure is to store the date and it has three integer fields **/ struct Date{    int day;    int month;    int year; }; /** This structure is to store the size of the box and it...

  • CREATE TWO C++ PROGRAMS : Program 1 Write a program that reads in babynames.txt (provided) and...

    CREATE TWO C++ PROGRAMS : Program 1 Write a program that reads in babynames.txt (provided) and outputs the top 20 names, regardless of gender. The file has the following syntax: RANK# BoyName Boy#OfBirths Boy% GirlName Girl#OfBirths Girl% You should ignore the rank and percentages. Compare the number of births to rerank. Output should go to standard out. Program 2 Write a program that reads a text file containing floating-point numbers. Allow the user to specify the source file name on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT