DO THIS ONLY IN MATLAB DO THE REQUIRED PART BELOW SHOW PROGR

DO THIS ONLY IN MATLAB DO THE REQUIRED PART BELOW SHOW PROGRAM WORK THANKS.

Given: The following list of numbers:

x= [21, 76, 44, 72, 73, 43, 50, 68, 62, 67, 41, 23, 63, 22, 23, 95, 96, 66, 75, 48, 10, 17, 77, 88, 80, 94, 60, 77, 51, 90, 77, 62, 66, 22, 35, 40, 56, 76, 98, 19, 43, 40, 32, 96, 53, 46, 91, 50, 12, 67, 88, 12, 74, 65, 91, 54, 59, 52, 32, 11, 42, 98, 64, 98, 22, 89, 39, 68, 65, 38, 77, 98, 69, 98, 95, 22, 45, 87, 62, 47, 54, 50, 50, 29, 16, 42, 74, 66, 85, 96, 67, 27, 96, 31, 27, 19, 20, 57, 77, 76, 85, 55, 75, 54, 54, 70, 67, 90, 57, 29, 38, 12, 70, 79, 32, 76, 22, 97, 43, 97, 94, 10, 25, 90, 31, 42, 99, 42, 90, 77, 19, 75, 32, 84, 30, 77, 54, 87, 68, 12, 17, 97, 14, 77, 76, 37, 54, 89, 34, 87, 86, 28, 88, 12, 19, 20, 45, 18, 53, 35, 86, 62, 10, 19, 46, 31, 86, 90, 18, 55, 92, 25, 52, 97, 93, 29, 34, 48, 18, 58, 36, 95, 77, 25, 97, 86, 35, 42, 95, 79, 67, 81, 41, 68, 90, 77, 89, 77, 68, 98];

Required:

Create a while loop to count how many even numbers there are before the 99 that is shown in red. Hint: All the numbers before and after are less than 99.

Check your results:

Practice4 = 71

Solution

x=[21, 76, 44, 72, 73, 43, 50, 68, 62, 67, 41, 23, 63, 22, 23, 95, 96, 66, 75, 48, 10, 17, 77, 88, 80, 94, 60, 77, 51, 90, 77, 62, 66, 22, 35, 40, 56, 76, 98, 19, 43, 40, 32, 96, 53, 46, 91, 50, 12, 67, 88, 12, 74, 65, 91, 54, 59, 52, 32, 11, 42, 98, 64, 98, 22, 89, 39, 68, 65, 38, 77, 98, 69, 98, 95, 22, 45, 87, 62, 47, 54, 50, 50, 29, 16, 42, 74, 66, 85, 96, 67, 27, 96, 31, 27, 19, 20, 57, 77, 76, 85, 55, 75, 54, 54, 70, 67, 90, 57, 29, 38, 12, 70, 79, 32, 76, 22, 97, 43, 97, 94, 10, 25, 90, 31, 42, 99, 42, 90, 77, 19, 75, 32, 84, 30, 77, 54, 87, 68, 12, 17, 97, 14, 77, 76, 37, 54, 89, 34, 87, 86, 28, 88, 12, 19, 20, 45, 18, 53, 35, 86, 62, 10, 19, 46, 31, 86, 90, 18, 55, 92, 25, 52, 97, 93, 29, 34, 48, 18, 58, 36, 95, 77, 25, 97, 86, 35, 42, 95, 79, 67, 81, 41, 68, 90, 77, 89, 77, 68, 98]
count = 0;
while x<99
if(rem(x,2)==0)
count = count + 1;
   end
end
disp(count)

DO THIS ONLY IN MATLAB DO THE REQUIRED PART BELOW SHOW PROGRAM WORK THANKS. Given: The following list of numbers: x= [21, 76, 44, 72, 73, 43, 50, 68, 62, 67, 41

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site