|
if - selective
return from two datasets
| Syntax: |
any if(float condition,
any a, any b) |
| Description: |
if takes each element
of condition and if it is true (not zero) takes the corresponding
element of a, otherwise takes the corresponding element of
b.
- if a or b is a single value then
this value is used for every element.
- if is useful as a quick way of choosing
one of two values:
if(time>"12:00:00","p.m.","a.m.")
- if is useful for applying a floor or a
ceiling to a dataset:
x = if(x<0,0,x); # same as x = max2(x,0);
or for undefining values:
x = if(x=-1,undef, x);
- Always try and use an if statement rather
than a for loop. It is much quicker. e.g.:
longs = if(longs<-180,longs+360,longs);
rather than
for i=1 to size(longs)
if longs[i]<-180 then
longs[i] = longs[i]+360;
endif
endfor
- N.B. x = (a>b); is better than x
= if(a>b,true,false);
A normal if programming control also exists. e,g
if exists(page_1.viewport1) then
v1 = page_1.viewport_1.XuNfirstDiagonalPoint;
else
v1 = (undef,undef);
endif
N.B. You wouldn't be able to use the if function
to do the same thing:
v1 = if(exists(page_1.viewport1),
page_1.viewport_1.XuNfirstDiagonalPoint,
(undef,undef) );
as Gsharp will try and evaluate both the true and
false arguments to the if function and will have a run-time error
on the true argument if page_1.viewport_1 does not exist. With the
if control Gsharp only evaluates the true block if the condition
is true.
|
| Examples: |
echo(if(-2:2,"true","false"));
x = rnd(10); echo(if(x>.5,.5,x));
page_1.view.dom.graph.XuNisolineIsolineType =
if(colorprint,"unshaded","off");
|
| See also: |
mask
|
import_ascii -
read an ASCII file
| Syntax: |
import_ascii(string
filename, float startLine, float
endLine, float startColumn, float endColumn,
string conversionFilter, string datasetNames, string
dataType, float numRows, float numColumns, float
numPlanes, string layout) |
| Description: |
The ASCII reader can read
ASCII files containing one or more datasets in rows columns or grids.
There are a number of options:
- You must specify either the number of datasets
or the names of the datasets in the argument datasetNames,
e.g. "6" or "x1 x2 x3 y1 y2 y3"
- You must specify whether the dataType
is "real" (default) or "text".
- If you are reading a single dataset then
you can use the numRows, numColumns and numPlanes
to inform Gsharp of the dimension of the data. N.B. The layout
argument has no affect on how single datasets are read.
- If you are reading multiple datasets then
the layout argument specifies whether the datasets are
arranged in columns - "vertical" or in rows - "horizontal"
(default).
- You can also tell the reader only to look for
data within a certain window in the file using the argumnets startLine,
endLine, startColumn and endColumn. N.B.
In this context a column is a character column not a column of
data.
- You can also use a conversionFilter as
described in import_report
N.B. The ASCII reader completely ignores line feeds.
It works through the file looking for numbers wherever they are
and then stores the values it finds into datasets as instructed
by you.
There is no reason why you can't making multiple
calls to import_ascii to read data from the same file.
|
| Example file: |
#Here is an example of file that must be read
#It is has a 2 line header then numLong, numLat, numVar ...
13 7 2
-180 -150 -120 -90 -60 -30 0 30 60 90
120 150 180
-90 -60 -30 0 30 60 90
Pressure
0.2113 0.0598 0.6382 0.0317 0.9214 0.6594 0.9648 0.8981 0.3334 0.6341
0.6654 0.9903 0.9651 0.6828 0.1438 0.5082 0.3011 0.2428 0.3351 0.8422
0.9231 0.1792 0.3111 0.9144 0.9289 0.2619 0.6168 0.6629 0.4658 0.1549
0.1484 0.3902 0.3020 0.6907 0.3192 0.4496 0.0000 0.9936 0.8267 0.9201
0.9574 0.2193 0.9673 0.7618 0.5235 0.4464 0.2793 0.8295 0.2482 0.9944
0.4157 0.7624 0.6985 0.3668 0.8848 0.8968 0.3152 0.8908 0.2879 0.4992
0.7718 0.8779 0.2787 0.9375 0.1796 0.2228 0.7618 0.9236 0.1709 0.6381
0.8773 0.2344 0.9207 0.2216 0.2308 0.5046 0.4143 0.3749 0.2303 0.5168
0.0435 0.0132 0.8066 0.7946 0.5033 0.9925 0.5749 0.2264 0.6066 0.9412
0.3243
Temp
0.4314 0.5919 0.9079 0.8893 0.9726 0.4268 0.1239 0.9028 0.3119 0.7409
0.4726 0.0205 0.8032 0.4217 0.9019 0.5921 0.3011 0.5298 0.9716 0.0393
0.4681 0.9377 0.8845 0.7411 0.1802 0.8016 0.5201 0.2795 0.4641 0.2333
0.4015 0.1812 0.3662 0.2835 0.6387 0.7544 0.2024 0.0122 0.9081 0.1008
0.9179 0.9486 0.0542 0.8082 0.4325 0.0698 0.4839 0.9723 0.0755 0.7704
0.4192 0.3847 0.0587 0.5222 0.9296 0.3699 0.3045 0.7733 0.6848 0.7002
0.9217 0.8657 0.7391 0.5716 0.9592 0.5196 0.5529 0.0597 0.6869 0.1176
0.4725 0.5171 0.5702 0.2682 0.9882 0.5049 0.5521 0.6905 0.1748 0.1179
0.0997 0.2341 0.0787 0.8172 0.4489 0.6181 0.1249 0.1069 0.1525 0.7942
0.4534
|
| Sample code: |
function ReadFile(string filename);
float lp, numLines, i;
#Read first two lines into a string dataset called header
import_ascii(filename,1,2,,,,"header","text");
#Read important variables from line 3
import_ascii(filename,3,3,,,,"numLong numLat numVar");
lp = 4;
#Read Longitudes - ten values per line
numLines = div(numLong+9,10);
import_ascii(filename,lp,lp+numLines-1,,,,"Longitudes");
lp = lp+numLines;
#Read Latitudes - ten values per line
numLines = div(numLat+9,10);
import_ascii(filename,lp,lp+numLines-1,,,,"Latitudes");
lp = lp+numLines;
#Read Variables
numLines = div(numLat*numLong+9,10);
for i=1 to numVar
import_ascii(filename,lp,lp,,,,"VARNAME","text");
import_ascii(filename,lp+1,lp+numLines,,,,VARNAME);
$VARNAME = reshape($VARNAME,numLong, numLat, 1);
destroy VARNAME;
lp = lp+numLines+1;
endfor
endfunction
reset all;
ReadFile("test.dat");
create Viewport page_1.viewport_1;
create Domain page_1.viewport_1.domain_1
( XuNgraphClearance = false
);
page_1.viewport_1.domain_1.xaxis1.XuNtickmarksMajorStepValue = 30;
page_1.viewport_1.domain_1.yaxis1.XuNtickmarksMajorStepValue = 30;
create Graph page_1.viewport_1.domain_1.graph_1
( XuNcolorDataGrid = "Pressure",
XuNgraphType = "2DContour",
XuNxData = "Longitudes",
XuNyData = "Latitudes"
);
|
| Note: |
You might also want to consider
fopen for reading this file, as it would have the advantage that the
file would only be opened once rather than with every call to import_ascii. |
| See also: |
export_ascii |
import_ascii_folder
- Import folder written by export_ascii_folder
|
Syntax:
|
include "$UNIDIR/lib/libio.gsl";
import_ascii_folder(string filename,
string folder)
|
|
Description:
|
The specified filename is read into folder.
The file must have been created by export_ascii_folder.
The folder can be written out on one platform with export_ascii_folder
and then read in on another platform using improt_ascii_folder.
-
If folder equals "" then the current
folder is used.
-
This function is implemented in GSL. Either
include the library libio.gsl (as shown) in your code or copy
the function from your library.
-
It is suggested that you use the extension ".afl"
for ASCII Folders.
- If you are not concerned about creating platform
independent files, then export_ascii and import_ascii
are quicker and produce smaller files.
|
|
Example:
|
import_ascii_folder("WORK.afl", "WORK2");
|
|
See also:
|
import_folder, export_ascii_folder
|
import_binary -
read a binary file
| Syntax: |
import_binary(string
filename, string fileType, float wordsPerRecord,
string datasetName, float numRows, float numColumns,
float numPlanes) |
| Description: |
The binary reader is used
for reading binary files created by C or FORTRAN programs.
- fileType can be either "c_byte",
"c_float", "c_int", "c_short", "f77_int"
or "c_real".
- wordsPerRecord should be 512
- The dimension of datasetName can be controlled
using numRows, numColumns and numPlanes.
|
| See also: |
export_binary |
import_csv -
read a comma separated file
| Syntax: |
import_csv(string
filename, float headerRows, float headerCols,
float layout, float datatype, float undefVal) |
| Description: |
Read the comma separated
file filename.
|
| Example file: |
Counts,UK,France,Germany,Spain
January,3,4,2,5
February,5,2,4,3
March,7,3,4,5
April,1,6,4,7
|
| Sample code: |
#Read sample.csv with headerRows=1, headerCols=1
#layout="Grid" and datatype="Float"
import_csv("sample.csv",1,1,2,1); |
import_excel -
read an Excel spreadsheet - Windows only
| Syntax: |
import_excel(string
filename, string sheetName, float layout,
string dataStart, string dataEnd, string headerStart,
string headerEnd, float undefVal) |
| Description: |
Read a Microsoft Excel
spreadsheet
- Only available on Windows.
- sheetName is name of sheet to read.
- layout is one of:
| 0 |
Columns (default) |
| 1 |
Rows |
| 2 |
Grid |
- dataStart is the upper-left corner of
the data and dataEnd is the bottom-right corner of the
data. If these values are omitted the whole sheet is used.
- headerStart and headerEnd specify
the location of the text header. If not specified Gsharp will
take any text that precedes the data.
- Any cells with the value undefVal will
be read as UNDEF. The default value is 999.999
|
| Example file: |
| Counts |
UK |
France |
Germany |
Spain |
| January |
0.211326 |
0.772698 |
0.2646 |
0.2646 |
| Febuary |
0.665415 |
0.317982 |
0.48452 |
0.48452 |
| March |
0.923165 |
0.414515 |
0.782363 |
0.782363 |
| April |
0.148441 |
0.74777 |
0.262789 |
0.262789 |
|
| Sample code: |
import_excel("sample.xls","excel",0,"A2","E5","A1","E1"); |
| See also: |
import_csv |
import_field -
read an AVS field file
| Syntax: |
import_field(string
filename) |
| Description: |
The AVS field format can
be used to read binary or ASCII data. The header of the field is used
to describe how the data is to be read.
See AVS 5 Documentation for further details.
|
import_folder -
read a folder file
| Syntax: |
import_folder(string
filename, string folderName) |
| Description: |
Read the folder file filename.
- If folderName is not set, the folder is
read into the current folder.
- If folderName does not exist, it is created.
- If the folder does exists then the datasets from
filename are merged in. Any datasets with the same name
as one in filename are replaced.
- Folder files are binary files and are not portable
between some operating systems.
|
| See also: |
export_folder
|
import_netcdf -
read a netCDF File
| Syntax: |
import_netcdf(string
filename, float readCoordinateInfo) |
| Description: |
Read the netCDF file filename
into the current folder.
- The names in the netCDF file will be used as
dataset names.
- If readCoordinateInfo is true then
a co-ordinate dataset is created for each dataset in the file.
The co-ordinate dataset has the same name as the dataset appended
with "_coords". The co-ordinate dataset is a string
array with the n'th element containing the name of the dataset
containing the co-ordinates of the n'th dimension of the dataset.
e.g. If grid is a 2 dimensional dataset located on a grid
whose x-cordinates are contained in longs and y-cordinates
are contains in lats, then grid will be read into
a float dataset and grid_coords will contain "longs"
// "lats".
|
| Example: |
import_netcdf("bob.cdf", true);
|
import_report -
read a report file
| Syntax: |
import_report(string
filename, string conversionFilter, string
titleDataset) |
| Description: |
The report reader will examine
filename for columns of data and then read them into Gsharp
as separate datasets.
- Once columns of data have been found, the reader
will look for column headers to use as dataset names.
- Columns are only delimited by spaces ("
"). If other characters are used they should be converted
to spaces using the conversion filter.
- A conversionFilter can be applied before
reading. See below for details.
- If titleDataset is specified then any
lines which the report reader decides are not part of the columns
of data are stored in the specified dataset.
The report reader uses the following logic for reading
reports:
- The conversionFilter is applied to each
line as it is read
- All characters with ASCII value less than 32
are replaced by blanks.
- The format of the line is calculated - numbers
must be separated by at least one blank, strings by two blanks.
For example "Yellow 2.3 Green Blue 4.0 4.0" has a format
of "string float string float
float". A valid format must include at least one float
column.
Once the reader finds three consecutive lines with the same number
of columns this is used as the format for the file and the reader
will include all the following lines which have the specified
number of columns.
- The reader then works backwards from the first
line accepted looking for dataset names. So, if five columns of
data have been read, it looks for a line with format "string
string string string string".
N.B. Each string must be separated by at least two spaces. If
the reader finds a line with an equal number of strings as columns
of data, then the names are used for dataset names. If a title
string is not a valid dataset
name, Gsharp creates a dataset name. If it can't find a line
containing dataset names it creates all the dataset names. Float
datasets are called "T1", "T2" and so on.
String datasets are called A1, A2 and so on. See the example for
a way of retrieving the names of the datasets used.
- Any lines which do not consist of the correct
number of columns are stored in the titlesDataset if specified.
|
| Sample code: |
function string MyImportReport(string filename)
string datasets;
float n;
datasets = namelist();
n = size(datasets);
import_report(filename);
return dropx(namelist(), 1:n);
endfunction
|
| See also: |
export_report
|
import_worldmap -
read the co-ordinates of a country or continent outline
| Syntax: |
float import_worldmap(string
countryCodes, string resolution, string longitude,
string latitude, float minLongitude, float maxLongitude,
float minLatitude, float maxLatitude) |
| Description: |
Retrieves country borders
from the Worldmap Databank I database.
- countryCodes is an array of countries
to be read. If a code is preceded by "-" it is excluded.
e.g. South America without Brazil would be "SAM"//"-BRA".
"" can be used to specify the whole world.
- A list of country codes can be created using:
echo(getcode()+" - "+getcountry());
- import_worldmap returns complete polygons
which can be used for region or barrier data as well as for overlaying
as line graphs.
- resolution can be either "full",
"reduced_1", "reduced_2", "reduced_3"
(default) or "reduced_4"
- longitude is the name of the dataset to
store the retrieved longitudes The default name is Long. If the
dataset exists, it is overwritten.
- latitude is the name of the dataset to
store the retrieved latitudes. The default name is Lat. If the
dataset exists, it is overwritten.
- import_worldmap returns the number of co-ordinates
read.
- The retrieved co-ordinates can be cropped using
minLongitude, maxLongitude and/or minLatitude and maxLatitude.
Gsharp will make sure that any cropped data still forms complete
polygons.
|
| Sample code
1: |
import_worldmap("GBR","full");
grid = bilinear(rnd(9),rnd(9),rnd(9));
gridx = range(Long,33);
gridy = range(Lat,33);
create Viewport page_1.viewport_1
( XuNxRatio = 1,
XuNyRatio = 1.2
);
create Domain page_1.viewport_1.domain_1;
create Graph page_1.viewport_1.domain_1.graph_1
( XuNcolorDataGrid = "grid",
XuNgraphType = "2DContour",
XuNregionBorderCells = "contoured",
XuNregionXData = "Long",
XuNregionYData = "Lat",
XuNxData = "gridx",
XuNyData = "gridy"
);
|
| Sample code
2: |
reset;
import_worldmap("");
x1 = -90; x2 = 90; y1 = -45; y2 = 45; xdiff=5; ydiff=5;
create Viewport page_1.viewport_1;
create Domain page_1.viewport_1.domain_1
( XuNxMinimum = -180,
XuNxMaximum = 180,
XuNyMinimum = -90,
XuNyMaximum = 90
);
page_1.viewport_1.domain_1.xaxis1.XuNtickmarksMajorStepValue = 30;
page_1.viewport_1.domain_1.yaxis1.XuNtickmarksMajorStepValue = 30;
create Graph page_1.viewport_1.domain_1.graph_1
( XuNgraphType = "line",
XuNxData = "Long",
XuNyData = "Lat"
);
create Graph page_1.viewport_1.domain_1.box
( XuNgraphType = "line",
XuNxData = "x1//x2//x2//x1//x1",
XuNyData = "y1//y1//y2//y2//y1"
);
repaint;
for i=1 to 100
x1 = x1+xdiff*(1+rnd(1)); x2 = x2+xdiff*(1+rnd(1));
if x2>180 xdiff=-5;
if x1<-180 xdiff=5;
y1 = y1+ydiff*(1+rnd(1)); y2 = y2+ydiff*(1+rnd(1));
if y2>90 ydiff=-5;
if y1<-90 ydiff=5;
import_worldmap("",,,,x1,x2,y1,y2);
repaint;
endfor
|
| See also: |
getcode,
getcountry, showcode,
showcountry,
Country Codes
|
include
- include a script within another script
|
Syntax:
|
include filename
|
|
Description:
|
include the specified filename in the current script.
- The User Guide page on function
parameters includes a description of how GSL scripts are compiled
first then executed.
|
|
Code sample:
|
include "$UNIDIR/lib/libgui.gsl";
x = GuiGetFloats("gsharp_1.mydialog.bulletin.field"+(1:10));
|
|
See also:
|
eval, exec
|
input_choice -
give user a choice
| Syntax: |
string input_choice(string
prompt, string choices,
string default) |
| Description: |
Prompt the user with a choice
- choices is a string array with each element containing
a choice. It can contain a maximum of five chocies.
- default is the string of the default choice.
|
| Code sample: |
choice = input_choice("Are you sure?", "Yes" // "No", "No");
choice = input_choice("Specify position", "Top"//"Bottom"//"Cancel");
|
| See also: |
input_dataset,
input_file, input_float,
input_selection,
input_string |
input_dataset -
ask user for dataset
| Syntax: |
string input_dataset(string
prompt, float requiredType,
float requiredDimension) |
| Description: |
Prompt the user for a dataset
and return it as a string.
- requiredType is used to specify what type
of dataset is selectable.
| 1 |
float |
| 2 |
string |
| 4 |
date |
| 8 |
time |
values can be or'd to allow multiple values.
e.g. 11 = 8 + 2 + 1 = time, string or float
This parameter is optional. If it is not specified
all dataset types are displayed.
- requiredDimension is used to specify what
dimension of dataset is selectable.
values can be or'd to allow multiple values.
e.g. 2 = 2 + 1 = 0D, 1D or 2D.
This parameter is optional. If it is not specified
all dimensions are displayed.
|
| Code sample: |
#This function is callback function for a button gsharp_1.dialog.B.myfieldButton
#When it is clicked on the user is prompted for a 2D float dataset.
#The user's choice is entered into the text field gsharp_1.dialog.B.myfield
function SelectDatasetCB(string o, string d, float r)
choice = input_dataset("Enter Dataset", 1, 2);
GuiSetString(o-"Button",choice, false);
endfunction
|
| See also: |
input_file,
input_float, input_selection,
input_string, input_choice |
input_file -
ask user for filename
| Syntax: |
string input_file(string
prompt, string mode, float match, string
pattern, string dir) |
| Description: |
Pop up a file selection
dialog.
The selected file is returned as a string. Files are selected by clicking
on them or by typing their name on the selection line.
- The prompt argument is used as the
title of the file selection dialog
- The mode argument is used to specify whether
or not the selected file can be read from or written to.
| r |
readable |
| w |
writeable |
| a |
writeable |
| + |
readable or writeable |
If mode is not specified then no check
is made
-
The match argument is true, then
it is only possible for files that already exist to be selected.
If it is false (or match is not specified) then
there is no restriction and users can type in a new filename
on the selection line.
-
The pattern argument is used to filter
the files that are listed. e.g. "*.txt", "*.gs?".
By default all files are listed. Users can still type in the
name of a file that does not match the pattern.
-
The dir argument is used to set the initial
directory of the file selection dialog. e.g. "C:\\My
Documents\\"
|
| Code sample: |
infile = input_file("Enter layout file to load","r",true,"*.lay","$APPDIR/layouts");
LoadLayout(infile);
outfile = input_file("Enter layout filename","w",false,"*.lay","$APPDIR/layouts");
SaveLayout(outfile);
|
| See also: |
input_dataset,
input_float, input_selection,
input_string, input_choice |
input_float -
ask user for float
| Syntax: |
float input_float(string
prompt, string min, float max, string
echo, float default) |
| Description: |
Pops up a dialog prompting
for a float.
- The title of the dialog is "Enter a number".
The prompt argument is displayed above the input field.
- The valid range for the number can be specified
with min and/or max.
- If the echo argument is false then
the numbers entered cannot be seen on the screen - they are replaced
with asterisks.
- If the user presses Cancel - input_float returns
undef.
- It default is not set then the default
value is 0.
|
| Examples: |
x = input_float("Enter a number between 0 and 1", 0, 1);
pin = input_float("Enter your 4-digit PIN", 0, 9999, false);
numIt = input_float("Enter number of iterations", 1, 100, true, 30);
|
| See also: |
input_dataset,
input_file, input_selection,
input_string, input_choice |
input_selection -
ask user to select from list
| Syntax: |
string input_selection(string
prompt, string items,
float match, float multi,
string default) |
| Description: |
Pop up a selection dialog
containing a number of strings.
- The main heading of the dialog is specifed by
the prompt argument
- The list of strings should be specified in the
items argument
- If match is false (or not specified),
then the selected string does not need to be one of the strings
in items - the user can type a new string in the selection
field
- If multi is true then the user can select
one or more strings from the list. All selected strings are returned
as an array. If no string is selected - then an empty string is
returned.
- If the user clicks on cancel, then UNDEF
is returned.
|
| Examples: |
color = input_selection("Select Color", "Red"//"Green"//"Blue", true, false);
attributes = "Clever" // "Charming" // "Wealthy" // "Sense of humour";
choices = input_selection("Select all that apply:", attributes, true, true);
|
| See also: |
input_dataset,
input_file, input_float,
input_string, input_choice |
input_string -
ask user for string
| Syntax: |
string input_string(string
prompt, string minimum, string maximum,
float echo) |
| Description: |
Pops up a dialog prompting
for a string.
- The title of the dialog is "Enter a text".
The prompt argument is displayed above the input field
- The valid range for each character can be specified
with the minimum and/or the maximum arguments. The
ASCII value of the character is used to decide the order. e.g.
use "a" to "z" to force all lower case letters,
""A" to "z", for lower case or upper
case letters and "0" to "z" to numbers or
letters.
- If the echo argument is false then
the characters entered cannot be seen on the screen - they are
replaced with asterisks.
|
| Examples: |
name = input_string("Enter your name");
password = input_string("Enter password in lower case", "a", "z", false);
|
| See also: |
input_dataset,
input_file, input_float,
input_selection, input_choice |
int - return
integer part
| Syntax: |
float int(float
x) |
| Description: |
Return the largest
integer less than or equal to each element of x |
| Examples: |
x |
int(x) |
-3.2
2
2.9 |
-4
2
2 |
| See also: |
nint
|
integrate -
return integral
| Syntax: |
float integrate(float
y) |
| Description: |
Integrate y using the following
approximation:
integral[n] = (-y[n-2] + 13*y[n-1] + 13*y[n+1]
- y[n+2]) / 24
- The first two and last two points have their
own special treatment
- The approximation is exact for third degree polynomials
- It is assumed that y values are 1 unit in x apart.
If they are not use the expression: accum(diff(integrate(y))*diff(x))
|
| Code sample: |
x = range(0//20,100);
y = cos(x);
y2 = accum(diff(integrate(y))*diff(x));
create Viewport page_1.viewport_1;
create Domain page_1.viewport_1.domain_1;
create Graph page_1.viewport_1.domain_1.graph_1
( XuNgraphType = "line",
XuNxData = "x",
XuNyData = "y"
);
create Graph page_1.viewport_1.domain_1.graph_2
( XuNxData = "x",
XuNyData = "y2"
);
|
| See also: |
differentiate,
diff |
invdaysince -
return date n days after 31/12/1600
| Syntax: |
float invdaysince(float
n) |
| Description: |
For each element,
return the date which is n days since 31/12/1600
- date is equivalent to invdaysince(daysince(date))
|
| Examples: |
n |
invdaysince(n) |
100000
200000 |
16-OCT-1874
31-JUL-2148 |
| Code sample: |
next50days = invdaysince(daysince(today)+(1:50));
|
| See also: |
daysince |
invfftimag -
imaginary part of inverse complex Fourier transformation
| Syntax: |
float invfftimag(float
r, float i) |
| Description: |
Return the imaginary part
of an inverse complex Fourier transformation |
| See also: |
invfftreal |
invfftreal -
real part of inverse complex Fourier transformation
| Syntax: |
float invfftreal(float
r, float i) |
| Description: |
Return the real part of an
inverse complex Fourier transformation |
| See also: |
fftcos,
fftsin, invfftimag |
invsecsince -
return time n seconds after midnight
| Syntax: |
float invsecsince(float
n) |
| Description: |
For each element,
return the time which is n seconds since midnight
- time is equivalent to invsecsince(secsince(time))
|
| Examples: |
n |
invsecsince(n) |
0
1
3600
86399
86400
86401 |
00:00:00
00:00:01
01:00:00
23:59:59
00:00:00
00:00:01 |
| Code sample: |
nextHour = invsecsince(secsince(time)+(1:3600));
|
| See also: |
secsince |
|