FILEREAD Function
The FILEREAD function reads data from an arbitrary ASCII file.
fileread("Filename", Line, Column)
The FILEREAD command contains the file name, the line number to read from and the column to read. The data in the respective columns of any line are separated by one or more spaces or tab characters.
Frequency in MHz Re(load) in Ohm Im(load in Ohm)
100 22.54 -12.56
150 25.07 -6.54
200 27.42 0.23
#numfreq = 3 ** Number of frequencies
!!for #i = 1 to #numfreq
** Define the frequency (conversion from MHz to Hz)
#freq = 1.0e6*fileread("datafile.dat", #i+1, 1)
FR 1 0 #freq
** Define the load
#Zr = fileread("datafile.dat", #i+1, 2)
#Zi = fileread("datafile.dat", #i+1, 3)
LZ 0 #Zr #Zi
** Computations ...
!!next ** End of frequency loop