I need help with doing this program using matlab.. Thank you ! Outline: 1. Displ
ID: 3873614 • Letter: I
Question
I need help with doing this program using matlab.. Thank you !
Explanation / Answer
Hi,
Here is the code you can use,
fprintf('welcome to the class statistics report') %welcome message
name = input('enter the course name:','s')% course name prompt
number = input('enter the test number:')% test number prompt
grades= input('enter the scores on one line inside brackets []: ')%scores prompt
Mean = mean(grades);%built in mean function
Median = median(grades);% built in median
% printing data %/
fprintf('Course: %s ', name)
fprintf('Test#%i ', number)
fprintf('The mean is %i ', Mean)
fprintf('The mean is %i ', Median)
rank=tiedrank(grades);% this gives ranks based on scores
fprintf('Rank Score ')
for i=1:length(grades)
fprintf('%i %i ',grades(i),rank(i))
endThumbs up if this was helpful, otherwise let me know in comments
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.