MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
A is a 5-by-2 numeric array.

Extract Data from One Variable

Use dot indexing to easily extract the contents of a single variable. Plot a histogram of the
numeric data in the variable, Weight.

figure()
histogram(patients.Weight)
title(' Patient Weight')

patients.Weight is a double-precision column vector with 100 rows. Alternatively, you
can use curly braces, patients{:,'Weight'}, to extract all the rows for the variable
Weight.

9 Tables

Free download pdf