make a array scoreboard in matlab

main.m
% Creating an array scoreboard in MATLAB
scores = [80, 75, 90, 85, 88];
disp('Scores:');
disp(scores);

% Updating a specific score
scores(3) = 95;
disp('Updated Scores:');
disp(scores);

% Adding a new score to the array
new_score = 79;
scores = [scores, new_score];
disp('Scores with New Score:');
disp(scores);

% Sorting the scores in ascending order
sorted_scores = sort(scores);
disp('Sorted Scores:');
disp(sorted_scores);
430 chars
21 lines

related categories

gistlibby LogSnag