Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a matlab scrip for the following a) Import Data 20 points https://catalog.data.gov/ Scroll down to the Comma Separated Value (CSV) file tab and click

Write a matlab scrip for the following
image text in transcribed
image text in transcribed
a) Import Data 20 points https://catalog.data.gov/ Scroll down to the Comma Separated Value (CSV) file tab and click on the download button. The file is about 15Mb, and this file should end up in your download folder: Heart Disease_Mortality Data Among.US Adults_35_by_State_Territory and.Co unty (1).csv" Open Matlab, and click on import data. It will show your files. Find your download folder, find the heart disease file, make sure it's highlighted by clicking on it, and click on open in the lower right. Matlab should open the file. Under "Range" in the menu bar of your import window, change the range to H2:H59077. Then click just outside of the range box, and Matl just that one column. Column H should be highlighted, and you're about to import a 50976 row x 1 column matrix of numbers In the "Output Type" box right next to the "Range "box, use the drop down menu and select "numeric matrix. That gives you a matrix rather than the default table of numbers. In the box next to output type, for cells with data that are unimportable replace "NaN" (which is the default) to 0.0 (number 0). If you don't do this your mean value will come out to NaN Now you should be set, and click on the green check mark in the upper right. It will take about 10 to 20 seconds to import the data depending on your computer. Close the import window, and look at your workspace. You should see the matrix. I suggest changing the name because it's too much to type. In the command window type: A- HeartDiseaseMortalityDataAmongUSAdults35byStateTerritoryandCoun; Don't forget the semicolon at the end or Matlab will put all those values in the command window. If it does, just use a clc command. Now save your workspace. Click on "Save Workspace" in the menu bar, enter "Heart Disease" as the file name, and click save. Check your MATLAB folder to make sure "Heart Disease.mat" is in there

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago

Question

Identify the elements that make up the employee reward package.

Answered: 1 week ago

Question

Understand the purpose, value and drawbacks of the interview.

Answered: 1 week ago