LoadData3D: Data loading and conversion of cartesian coordinates,...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function reads data from a txt file containing data of coordinates. Data can be read as cartesian coordinates, incremental data or polar coordinates. This functions returns a matrix with all possible data conversions.

Usage

1
LoadData3D(FileName, Type = 2)

Arguments

FileName

File name to load data

Type

Integer value that indicates the type of data contained in the file. Type 1 = Cartesian, Type 2= Incremental, Type 3 = Polar

Details

Input files must be in a certain format for the data type. By default the type is incremental data (Type = 2).

The cartesian coordinate type contains six columns, defining the coordinates of a vector. The first three columns represent the X, Y and Z coordinates of the intial data and the last three columns represents the coordinates of the final data, and each row corresponds to one of the data. If necessary, the inverse order can be used to adapt the direction to our data.

The incremental data type contains three columns, the first column is the increase of X coordinate, the second column is the increase of Y coordinate and the third column is the increase of Z coordinates, and each row corresponds to one of the data. The X coordinate, Y coordinate and Z coordinate are obtained from the difference of the final node with respect to the initial node.

The polar type contains two or three columns. If it contains two columns, the first column represents the colatitude and the second column represents the longitude, in this case the module by default is equal to 1. If it contains three columns, the first column represents the module, the second column represents the colatitude and the third column represents the longitude. Each row corresponds to one of the data.

Typical usages are

1
2
3
4
    LoadData3D(FileName, \dots)
    LoadData3D(FileName, Type=2)
    ......
   

Value

The function returns a nx13 matrix size , where n is the number of data. The column 1 represents the module, the column 2 represents the colatitude, the column 3 represents the longitude, the column 4 represents the increase of X coordinate, the column 5 represents the increase of Y coordinate, the column 6 represents the increase of Z coordinate, the column 7 represents the type of input data, the column 8, 9 and 10 represent the X, Y and Z coordinates of the initial data, the column 11, 12 and 13 represent the X, Y and Z coordinates of the final data.

The columns 8, 9, 10, 11, 12 and 13 will only have values if the input data are of Type 1 (cartesian coordinates).

Author(s)

Felicisimo, A.M., amfeli@unex.es, Ruiz-Cuetos, J.C., bilba_t@hotmail.com, Polo, M.E., mepolo@unex.es, Cuartero, A., acuartero@unex.es, Rodriguez, P.G. pablogr@unex.es

References

Website http://gim.unex.es/VecStatGraphs3D/

See Also

DrawDensity3D, DrawModuleAndAngleDistribution3D, AllAngleStatistics, AllModuleStatistics3D, RayleighTest3D.

Examples

1
2
   FileName<-system.file("data/XYZcoor.txt", package="VecStatGraphs3D")
   LoadData3D(FileName, Type=1)

VecStatGraphs3D documentation built on May 1, 2019, 8:03 p.m.