classUnderlying
Class of underlying data in tall array
Syntax
Description
Examples
Determine Underlying Class of Tall Arrays
All tall tables and arrays belong to the tall
class. However, the underlying data type of a tall array can vary.
Create a datastore for the airlinesmall.csv
data set. Select a subset of the variables to work with, and treat 'NA'
values as missing data so that datastore
replaces them with NaN
values. Convert the datastore into a tall table.
varnames = {'Year', 'UniqueCarrier'}; ds = tabularTextDatastore('airlinesmall.csv','TreatAsMissing','NA',... 'SelectedVariableNames',varnames); tt = tall(ds)
tt = Mx2 tall table Year UniqueCarrier ____ _____________ 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} 1987 {'PS'} : : : :
Determine the class of the tall table tt
and the first table variable Year
.
class(tt)
ans = 'tall'
class(tt.Year)
ans = 'tall'
Determine the underlying data types of tt
, as well as the Year
and UniqueCarrier
table variables.
classUnderlying(tt)
ans = 1x5 tall char array 'table'
classUnderlying(tt.Year)
ans = 1x6 tall char array 'double'
classUnderlying(tt.UniqueCarrier)
ans = 1x4 tall char array 'cell'
In some cases, the result returned by classUnderlying
is an unevaluated tall array. Unevaluated tall arrays can be evaluated using the gather
function to bring the result into memory.
Input Arguments
X
— Input array
tall array
Input array, specified as a tall array.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| table
| cell
| categorical
| datetime
| duration
| calendarDuration
Output Arguments
C
— Underlying class
tall array
Underlying class, returned as a tall array.
Tips
Use
isaUnderlying
to test whether a tall array has a particular underlying data type.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
The classUnderlying
function
supports GPU array input with these usage notes and limitations:
See
classUnderlying
(Parallel Computing Toolbox).
Version History
Introduced in R2016b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)