I am in hurry. Please answer
Use a for loop to compute a sum II O solutions submitted (max 10) One of the most common applications of for loops in MATH 307 is to compute a sum st Use the following lines to create a vector of length 1000 ng(307); % set the random number generator seed so everyone gets same answer x = rand(1,1800) 2-1; % create vector of random #5 Write MATLAB code that computes how many elements of the vector x are less than or equal to 0.2. Store the result in a variable called mysum Script 1 rng(307); % set the random number generator seed so everyone gets same answer 2 X = rand(1,1800)*2-1; % create vector of random #s 3 Temperature Counting O solutions submitted (max: 10) The daily high temperatures in New York, NY and Anchorage, AK for a bunch of days in a row are given: TNY [31, 26, 38, 33, 33, 39, 41, 41, 34, 33, 45, 42, 36, 39, 37, 45, 36, 45, 22, 28, 46, 48, 45, 40, 29, 26, 52, 46, 24, 36, 48, 32, 43, 36, 41, 37, 32, 32, 35, 42, 38, 39, 40, 37, 36, 51, 5e]; TAN = [37, 24, 28, 25, 21, 28, 46, 37, 36, 20, 24, 31, 34, 40, 43, 36,... 47, 23, 42, 28, 34, 47, 44, 38, 23, 32, 37, 40, 22, 24, 49, 51,... 34, 41, 42, 35, 38, 36, 35, 33, 42, 42, 37, 26, 20, 25, 31); Write a script to 1. Count the number of days that the temperature in NY was above the average temperature of NY. Store the answer in a variable called aboveNY. 2. Count the number of days that the temperature in AK was above the average temperature of AK Store the answer in a variable called aboveAR 3. Count how many days the temperature in AK was higher than that in NY. Store the answer in a variable called Akhigher. Script 1 TNY = 2 3 [31, 26, 32, 33, 33, 39, 41, 41, 34, 33, 45, 42, 36, 39, 37, 45, ... 36, 45, 22, 28, 46, 48, 45, 40, 29, 26, 52, 46, 24, 36, 48, 32,... 43, 36, 41, 37, 32, 32, 35, 42, 38, 33, 40, 37, 36, 51, 50); [37, 24, 28, 25, 21, 28, 46, 37, 36, 20, 24, 31, 34, 40, 43, 36, ... 47, 23, 42, 28, 34, 47, 44, 38, 23, 32, 37, 40, 22, 24, 49, 51, ... 34, 41, 42, 35, 38, 36, 35, 33, 42, 42, 37, 26, 20, 25, 31); 4 TAN = 5 6 2 8