?? signal_package.c
字號:
(for 'b0' and 'bconst'). \The flag -x allows to fix the abscissa interval <xmin> <xmax> of the result. Default values for <xmin> <xmax> \are the abscissa interval of <signal>. The command retursn the time ellapsed (in seconds).}}}", "corr", C_CorrSig,"{{{<signalIn1> <signalIn2> <signalCorrelation> <dxmin> <dxmax> [-c] [-n]} {Computes the correlation function between the \realization <signalIn1> of a first stochastic process and the ralization <signalIn2> of a second stochastic process. The output \is set in <signalCorrelation>. The correlation function is computed with a lag going from <dxmin> to \<dxmax> (the dx fields of the realizations are taken into account). These values represent the origin of the second signal compared to the origin of the first signal \(which is fixed). \By default, the border effects are not used for the computations unless '-c' is specified. The result is divided by the product of the square \mean roots of the variances of <signalIn1> and <signalIn2> unless '-n' is specified.}}}", /* * CProcs in signal_file.c */ "write",C_Write,"{{{<signalIn> (<filename> | <stream>) [('xy' | 'yx' | 'x' | 'y']) [-h] [-f <format1> [<format2>]] [-a] [-r [('little' | 'big')] [<floatSize>]]} {Writes a signal into a <file> or a <stream>. \It writes the file either in a raw format (using '-r' option) or (by default) in the LastWave format with binary coding (unless '-a' is specified in which case ascii coding \is used). \n\In the LastWave format, there are different modes :\n\ - 'xy' : First column is X and second is Y (in ascii mode), or the X-values are stored first then the Y-values (in binary mode).\n\ - 'yx' : First column is Y and second is X (in ascii mode), or the Y-values are stored first then the X-values (in binary mode). \n\ - 'y' : A single column made of Y \n\ - 'x' : A single column made of X \n\By default it uses 'xy' mode for xy-signals and 'y' mode for y-signals. The options are : \n\ -h : No Header (ONLY in ascii mode).\n\ -f : In case of ascii writing, allows to specify the (printf) formats for each column.\n\ -a : Ascii writing (instead of binary). \n\ -r : The data (just the y\\'s) are written in raw format (binary floats coded on <floatSize> bytes) with no header. In that case you can specify whether you want to write them as little endian \data or big endian data. If nothing is specified the endianness of the computer is used.}}}", "read",C_Read,"{{{<signalOut> (<filename> | <stream>) [[<xCol>] <yCol>] [-f <firstPoint>] [-s <sizeToRead>] [-r [('little' | 'big')] [<floatSize>]]} {Reads a signal from a \<file> or a <stream>. The file must be in the LastWave format (i.e., created with 'write') or in the raw format (option '-r'). If option '-r' is not set then you can specify the column number for the x-values \and the column number for the y-values (first column is 1). If none are specified then this command tries to read the first two columns \as x and y or, if there is only one colum, directly the y values. If a stream is specicified and if option '-r' is not set then, at the end of the command the stream is positionned at the end of the signal (even if just a few points are read). The options are \n\ -f : It reads the signal starting from index <firstPoint> (first point is at index 0) \n\ -s : It reads only <sizeToRead> values\n\ -r : The data (just the y\\'s) are in raw format (binary floats) with no header. In that case you can specify whether you want to read them as little endian \data or big endian data. If nothing is specified the endianness of the computer is used. One can specify also the <floatSize>, i.e., the number of bytes for each float.}}}", "readinfo",C_ReadInfo,"{{{(<filename> | <stream>) [-p]} {This command is used in order to get information about a signal file or stream that will be read (later) by the 'read' comand. \If '-p' is set then information on the file or stream is printed in a in fully explained english. If it is not set then either it does not return anything \(which means that the file is not readable) or it returns a listv which gives some information. The first element of the listv is 0 \if there is no header or 1 there is one. If the file has no header then the remaining is of the form \'nColumns' 'size'. If it has one the next element describes the way the values are coded : it is either 'ascii', \'binary little <xx>' or 'binary big <xx>' where <xx> is the number of bits used to store a float. The next element is the type of the signal (either 'x' or 'xy'). If the signal is of type 'y' then the next two elements \are the signal fields 'x0' and 'dx'. Finally the last two elements are the sigal fields 'firstp and lastp'.}}}", /* * CProcs in signal_create.c */ "cantor",C_Cantor,"{{{<signalOut> <depth> <s1> <s2> <s3> <p1> <p3>} {Generates a 1-->3 cantor (with a hole in the middle) given a number of \iterations <depth> the relative sizes \<s1>, <s2> and <s3> (must be integers!) of each 3 interval and the weights <p1> and <p3> of the first interval and the last one. This algorithm \stops after <depth> iteration. It is not adapted to the local resolution (as for the command 'ucantor')}}}", "ucantor",C_UCantor,"{{{<signalOut> <size> <r1> <p1> <r2> <p2> [... <rN> <pN>]} {Generates a 1->N cantor of size <size> down to the smallest resolution \(the smaller the interval the greater the number of iterations). If you want not adapt the number of iterations to the local resolution use \the 'cantor' command instead. The <ri>'s correspond to the relative size of each interval (the sum must be equal to 1) \and the <pi>'s correspond to their respective weights (the sum must be equal to 1).}}}", /* * CProcs in fft_commands.c */ "fft",C_Fft,"{{{<signalInReal> [<signalInImag>] <signalOutReal> <signalOutImag> [-is]} {Computes the Fourier transform \or the inverse Fourier transform (if '-i' is set) of a signal (complex or real) which must has a size which is a power of 2. \By default, the fourier transform of a complex signal \is supported by [-Fs/2,Fs/2[ where Fs = 1/signal->dx is the sample frequency (in Hertz) and has the same number of points \as the original signal. If '-s' is set then no shift is performed \after the fft algorithm has been performed, thus the resulting fourier transform is represented between [0,Fs[. \Consequently, for the inverse \fourier transform if '-s' is not set then the input fourier transform is supposed to be between [-Fs/2,Fs/2[ and otherwise \it should be between [0,Fs[. In the case you want to do the fourier transform of real signal, you should ommit \<signalInImag> in the command line. The computed fourier transform \is supported by [0,Fs]. It has one more point than the original signal. If you want to invert the so obtained fourier \transform, you should ommit <signalOutImag> in the command line and use the '-i' option. The so-obtained real signal will \be placed in <signalOutReal>. Let us note that in the case of a real input signal, the option '-s' is useless. \In any case, 'fft' returns the elapsed time in seconds.}}}", NULL,NULL,NULL};static CProcTable signalTable = {signalCommands, "signal", "Commands related to signals"};/*********************************** * * Loading/Adding the signal package * ***********************************/int tSIGNAL, tSIGNAL_;int tSIGNALI, tSIGNALI_;extern TypeStruct tsSignal;static void LoadSignalPackage(void){ /* * The &signali type MUST be defined before the &signal type, so that when looking for * matching a type to a variable, we first try to match &signali */ tSIGNALI = AddVariableTypeValue(signaliType, &tsSignal, (char (*) (LEVEL, char *, void *, void **)) ParseSignalILevel_); tSIGNALI_ = tSIGNALI+1; tSIGNAL = AddVariableTypeValue(signalType, &tsSignal, (char (*) (LEVEL, char *, void *, void **)) ParseSignalLevel_); tSIGNAL_ = tSIGNAL+1; AddCProcTable(&signalTable); DefineGraphSignal();}void DeclareSignalPackage(void){ DeclarePackage("signal",LoadSignalPackage,1998,"2.1","E.Bacry, N.Decoster and X.Suraud", "Package allowing to deal with signals.");}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -