0% found this document useful (0 votes)
57 views

Summary: Getting Started With The Data: Readtable Hurrs Readtable (,, 5, ,)

The document provides instructions for importing and summarizing hurricane data from 1990s. It can be summarized as follows: 1) The readtable function is used to import data from a text file into a table in MATLAB. Additional arguments help with irregularly formatted files. 2) Variables in the imported table can be accessed using dot notation and functions like scatter can create plots from table variables. 3) The categorical function converts variables to categorical arrays. Variables may be imported as datetime by default.

Uploaded by

Hemant Bhadoria
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Summary: Getting Started With The Data: Readtable Hurrs Readtable (,, 5, ,)

The document provides instructions for importing and summarizing hurricane data from 1990s. It can be summarized as follows: 1) The readtable function is used to import data from a text file into a table in MATLAB. Additional arguments help with irregularly formatted files. 2) Variables in the imported table can be accessed using dot notation and functions like scatter can create plots from table variables. 3) The categorical function converts variables to categorical arrays. Variables may be imported as datetime by default.

Uploaded by

Hemant Bhadoria
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Summary: Getting Started with the Data

The readtable funct >> hurrs = readtable('hurricaneData1990s.txt',...


ion creates a table in 'HeaderLines',5,'CommentStyle','##');
MATLAB from a data
file.

Additional inputs can


help import
irregularly formatted
files.
>> scatter(hurrs.Windspeed,hurrs.Pressure)

You can use dot


notation to access
variables in a table.
The scatter functio
n creates a scatter
plot of two vectors.

The categorical fu >> hurrs.Country = categorical(hurrs.Country);


nction creates a
categorical array
from data.
By default, >> t = hurrs.Timestamp;
the readtable functi
on may import
certain variables in
the table
as datetime.

In this
example, hurrs.Tim
estamp is
a datetime.
The hour function >> h = hour(t);
returns the hour >> histogram(h)
numbers of the input
datetime values.

Creating Datastores
Reading the data using a datastore consists of three steps.
1. Creating a datastore that refers to a single file or set of files in a directory.
2. Adjusting the properties of the datastore according to the file contents.
3. Reading the data from the file.
In this lesson, you will learn about creating datastores. A datastore is just a reference to a file or a set
of files. Creating a datastore does not automatically import any data into MATLAB.

You might also like