MatlabThe following student grades need to be entered using
Matlab/The following student grades need to be entered using the input function and stored in a vector G. Use a while loop to accept the input from the keyboard, store the values and then compute the average of all the grades. You must use the while loop to do this work. Grades= 72, 77, 89, 78, 98, 79, 88, 87, 90, 85
Solution
n=1;
sum = 0;
average;
while n<=10.
x= input(\"Enter grade\");
G[i]= x;
sum = sum+G[i];
n=n+1;
end
average = sum/10;
