isaUnderlying
Determine if tall array data is of specified class
Syntax
Description
Examples
Test 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'} : : : :
Test whether the underlying data type of the first table variable Year
is single
.
tf = isaUnderlying(tt.Year,'single')
tf = tall logical 0
Determine the actual underlying data type of Year
.
udt = classUnderlying(tt.Year)
udt = 1x6 tall char array 'double'
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
cl
— Underlying class
character vector
Underlying class, specified as a character vector specifying any valid MATLAB® class name.
Example: tf = isaUnderlying(X,'double')
Tips
Use
classUnderlying
to determine the underlying data type of a tall array.
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 isaUnderlying
function
fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray
(Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (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)