Question
Create a matlab program given the following numbers
Paragraph Create a matlab code that compares college football teams scores given the following table. Create a menu that allows the user to choose which two schools teams to compare, and then graph the two schools based on their two choices. Make sure the code will still be able to run even if the scores are changed in the table 2016 Avg Score 2017 Avg Score 2018 Avg Score School OU UT UO 0 24 27 32 15 31 27 23 23 41
0 0
Add a comment Improve this question Transcribed image text
Answer #1

t=table([24;27;32],[15;31;27],[23;23;41],'VariableNames',{'Avg_Score_2016','Avg_Score_2017',...
'Avg_Score_2018'},'RowNames',{'OU','UT','UO'});
disp(t)

fprintf('********MENU********\n')
fprintf('1.OU\n2.UT\n3.UO\n');
op1=input('Enter the frist school name: ','s');
op2=input('Enter the second school name: ','s');

hold on
plot([2016,2017,2018],t{{op1},:})
plot([2016,2017,2018],t{{op2},:})
xticks(2016:2018)
yticks(0:50)
xlabel('year')
ylabel('AVG score')

MATLAB R2017a HOME Figure 1 . hsert-fxE▼ E3 怪区Run Section ▼ Go To▼ Comment ge-ase Breakpoints Run Run and ES Lal Find Files Compare Print File Edit View Insert Tools Desktop Window Help New Open Save Advance Run and Find ▼ Indent E Advance Current Folder 团Editor-GAMATLAB\R201 7abin,Untitled98m 42 41 +73 | Untitled91.m X | Untitled92.m XI Untitled93.m X 田山html 田山m3iregistry 困ぷprofile-results le ([24:27:32],[15:31:27],[23:23:41], Vari registry 34 田山util 田山win64 * MENU princt (1.ou n2.UI n3.Uoin) -input ( Enter the fri t cho 1 name: ,s mbuild.bat mcc.bat mex.bat 10 Command Window Untitled98 20 19 18 Avg Score 2016 Avg Score 2017 Avg Workspace Name A. Value 1x3 toble OU OU 24 UT 27 UO 32 15 31 27 23 23 41 2016 2017 2018 year opl 3x3 table MENU*** 1.O0 2.UI 3.0O Enter the Irigt school name: oU Enter the second school name: 00 27 Activate Windows script Ln 1 Col 1

Add a comment
Know the answer?
Add Answer to:
Create a matlab program given the following numbers Paragraph Create a matlab code that compares college...
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
  • Jubail University College Computer Science & Engineering Department Assessmen Assignment Course Code CS120/C5101 t Type: 1...

    Jubail University College Computer Science & Engineering Department Assessmen Assignment Course Code CS120/C5101 t Type: 1 Semester: 403 Course Title Programming Submission 27-06-2020 Total Points 8 Date Submission Instructions: • This is an individual assignment. • Please submit your program (Java fle) in Blackboard. You can create one java project, named as Assignment1_id and add separate java file for each question. You can name your javá files as 01.02.... etc. • Make sure that you include your student ID name...

  • Write the C program, to achieve as shown in the sample code execution, using the given...

    Write the C program, to achieve as shown in the sample code execution, using the given struct and using the comments in the given main program below: typedef struct{ char first[20]; char last[20]; float gpa; int score; } student; int main(void){ student *ptr; //first name //last name //student gpa //student score } //ask a user to enter the number of students, num //dynamically allocate memory for an array of students of the appropriate size (i.e. //num that the user just...

  • starter code To write a program using the starter code which is TestLinkedList to see if...

    starter code To write a program using the starter code which is TestLinkedList to see if the LinkedList program has bugs. It will produce ether a pass or fail.More information is in the first two pictures. LinkedList.java /** * @author someone * * Implements a double-linked list with four errors */ public class LinkedList<E> { // The first and last nodes in the list private Node<E> head, tail; // Number of items stored in the list private int size; //...

  • STA2221 examples on CI & Testing of Hypothesis Name MULTIPLE CHOICE. Choose the one alternative that...

    STA2221 examples on CI & Testing of Hypothesis Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answer the question Provide an appropriate response. 1) Find the critical value,te for 0.99 and n-10. A) 3.250 B) 3.169 1.833 D) 2.262 2) Find the critical value to forc=0.95 and n=16. A) 2.947 B) 2.602 2120 D) 2.131 3) Find the value of E, the margin of error, for A) 1.69 B) 0.42 0.99, n=16 and s=2.6. C)...

  • All of the following questions are in relation to the following journal article which is available...

    All of the following questions are in relation to the following journal article which is available on Moodle: Parr CL, Magnus MC, Karlstad O, Holvik K, Lund-Blix NA, Jaugen M, et al. Vitamin A and D intake in pregnancy, infant supplementation and asthma development: the Norwegian Mother and Child Cohort. Am J Clin Nutr 2018:107:789-798 QUESTIONS: 1. State one hypothesis the author's proposed in the manuscript. 2. There is previous research that shows that adequate Vitamin A intake is required...

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
ADVERTISEMENT