Question: In matlab code please You have been hired by the United Nations to assess the crime statistics in various countries. Data has been collected and

 In matlab code please You have been hired by the United In matlab code please

You have been hired by the United Nations to assess the crime statistics in various countries. Data has been collected and sent to you in a file UNDataCrimeStatistics.csv. You have been tasked with analyzing this data. The data consists of intentional homicides: number and rate per 100,000 population^1. The original file has six columns: CountOrArea, Year, Count, Rate, Source and SourceType. The Rate variable is based on deaths per 100,000 population. In some cases, there are several years of data, and other cases only one year of data. We would like to consolidate the data for each country using Matlab. You will need to: Load the data Extract and consolidate the data Sort the data for different fields Plot the data Display the data to the screen Create a function named LoadData, which inputs to the function a string containing the filename of the datafile, and returns from the function a cell array of data, and a header containing the column headings. The output should be a l times 1720 cell array named Data containing each line of the file stored as a string obtained using fgetl. Create a function named ParseData which inputs to the function the cell array Data and separates the strings obtained using fgetl into the fields identified by the header. The output of this function should be a 1719 times 4 cell array named OrigData. This will be stored separately to access the unconsolidated data, if necessary. Strsplit or strtok may not be used.^1http://data.un.org/Explorer.aspx?d=UNODC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!