Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fread_delimited (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: support

Requires: MathScript RT Module

Syntax

m = fread_delimited(file, d)

m = fread_delimited(file, d, range)

m = fread_delimited(file, d, row, col)

Legacy Name: dlmread

Description

Reads an ASCII delimited file.

Details

Examples

Inputs

Name Description
file Specifies the file you want to read. file is a string
d Specifies the delimiter that separates the values in the file. For example, a value of \t specifies a single tab character as the delimiter. d is a string.
range Specifies the range of the data you want to read. range is a vector of four elements [a b c d], where [a b] is the upper-left corner of the data you want to read and [c d] is the lower-right corner of the data you want to read. You also can use Microsoft Excel spreadsheet notation to specify range, as in range = 'A1..B3'.
row, col Specify the location at which you want to start reading the data. row and col are zero-based.

Outputs

Name Description
m Returns the matrix.

Details

If you use this function in a stand-alone application or shared library and file is a relative path, LabVIEW searches for the file in the path where you installed the application or shared library. (Real-Time Module) If you deploy this function to an RT target and file is a relative path, LabVIEW searches for the file in the path returned by the Default Data Directory VI.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT No (affects entire script)

Examples

In the following example, LabVIEW creates test.dlm in the LabVIEW Data directory. LabVIEW then reads the values in test.dlm and returns these values as a matrix.

fwrite_delimited('test', magic(5), '/', 2, 2);
a = fread_delimited('test', '/', 'A2..C3')

Related Topics

fread_csv
fwrite_csv
fwrite_delimited
str_to_range


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit