| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
data = xptread
data = xptread(filename)
[data,missing] = xptread(filename)
xptread(...,'ReadObsNames',true)
data = xptread displays a dialog box for selecting a file, then reads data from the file into a dataset array. The file must be in the SAS XPORT format.
data = xptread(filename) retrieves data from a SAS XPORT format file filename. The XPORT format allows for 28 missing data types, represented in the file by an upper case letter, '.' or '_'. xptread converts All missing data to NaN values in data. However, if you need the specific missing types then you can recover this information by specifying a second output.
[data,missing] = xptread(filename) returns a nominal array, missing, of the same size as data containing the missing data type information from the xport format file. The entries are undefined for values that are not present and are one of '.', '_', 'A',...,'Z' for missing values.
xptread(...,'ReadObsNames',true) treats the first variable in the file as observation names. The default value is false.
xptread only supports single data sets per file.
Read in a SAS XPORT format dataset:
data = xptread('sample.xpt')
![]() | X property (TreeBagger) | x2fx | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |