24.7 Clone OF LAD. Highest cases date 384106.2595600.qx3zg/7 LAB ACTIVITY 24.7.1: Clone of LAB: Highest cases date No. c

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

24.7 Clone OF LAD. Highest cases date 384106.2595600.qx3zg/7 LAB ACTIVITY 24.7.1: Clone of LAB: Highest cases date No. c

Post by answerhappygod »

24 7 Clone Of Lad Highest Cases Date 384106 2595600 Qx3zg 7 Lab Activity 24 7 1 Clone Of Lab Highest Cases Date No C 1
24 7 Clone Of Lad Highest Cases Date 384106 2595600 Qx3zg 7 Lab Activity 24 7 1 Clone Of Lab Highest Cases Date No C 1 (48.06 KiB) Viewed 29 times
24.7 Clone OF LAD. Highest cases date 384106.2595600.qx3zg/7 LAB ACTIVITY 24.7.1: Clone of LAB: Highest cases date No. cases Highest cases date During the Coronavirus pandemic, statistics such as number of new daily cases are gathered to help study the growth or decline of the spread of the virus. A country's cumulative new case data after 100 cases is provided for this problem. The data is taken from https://informationisbeautiful.net/data/and shows accumulative data for 128 days. The data plot is shown in the figure below. 1.5 0.5 *105 20 Accumulative Case Number 40 60 This tool is provided by a third party. Though your activity may be recorded, a page refresh may be needed to fill the banner. 80 100 120 0/100 140 Days One important statistical parameter is the maximum value. Finding the maximum value and the relative location of the maximum in data, like the date of the occuracne of the maximum number of cases, can help in further studies of the progression or digression of the disease. Write a function called FindMaxCovid() that takes in the accumulative data and returns the maximum number of new cases, as well as the date the maximum number occured. Given:
Given: accumNum: a 1D array containing the accumulative number of cases for 128 days The output is: maxCovidNum: the maximum number of new cases occuring on a day maxCovidDay: the day the maximum number occured The derivative of the daily data, not the accumulative data, should be used to find the maximum. Using this method, the data may have more than one maximum. Therefore, the results should be checked for the real maximum and not the local maximum. Note: plolyfit() and polyder() must be used in this function.
Function 1 function [maxCovidNum, maxCovidDay] = FindMaxCovid (accumNum) D = [1:length (accumNum)]'; 4 5 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 end 27 % p is the accumulated 5th order 128 day modeled data. [p,s] = polyfit(AccumNum, D, 5); % Takes the first derivative of AccumNum data and gives the real number of cases for each day. % Diff theoretically should give the same answer, but since the data is modeled, the answers will not be the dp = gradient (accumNum(:), D(:)); % Number of daily cases from the first derivative model. Has to be an integer. dailyCases = round (polyval(dp,D)); Save C Reset % Takes the second derivative of AccumNum data. The roots of derivative of data are usually the maxima of dat ddp = gradient (dp(:), D(:)); % The roots are not integers and should be rounded to give the day number. % Using floor will not give the max values. derivativezeros = floor(roots(ddp)); % Provides the single ablsolute max and the index [maxCovidNum, ind] =max(dailyCases (derivativezeros)); %Gives the date of the max maxCovidDay = derivativezeros(ind); MATLAB Documentation Code to call your function C Reset
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply