Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > System

read

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Reads data from a text file as a string. The supported file format is ASCII.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

read(filename, size);

Read a text file as a string for the user defined size 'size'. The default value for size is 1e+6, if not specified.

 

Note: This function will check for the file in the current working directory. If the file to read from is in a different directory, either specify the full path or change the current working directory.

 

Examples

If you have a text file called testfile.txt with the following strings:

String saved in text file

 

M=read("testfile.txt");

?M;

String saved in text file

 

See Also

System level, readdata, struct, cell

Copyright Lumerical Inc. | Privacy | Site Map