bart vec
#
==================================================================================================================
The bart vec
command in BART is used to create a vector of values from a list of inputs.
Where we can view the full usage string and optional arguments with the -h
flag.
!bart vec -h
Usage: vec val1 ... valN <output>
Create a vector of values.
-h help
where:
val1 ... valN
: A list of numerical values that will be placed in the vector.
<output>
: The output file where the vector will be saved.
Examples (Using Bash)#
Example 1#
Generate a vector with values from 1 to 8#
!bart vec $(seq 1 8) vector
!bart show vector #display the vector
+1.000000e+00+0.000000e+00i +2.000000e+00+0.000000e+00i +3.000000e+00+0.000000e+00i +4.000000e+00+0.000000e+00i +5.000000e+00+0.000000e+00i +6.000000e+00+0.000000e+00i +7.000000e+00+0.000000e+00i +8.000000e+00+0.000000e+00i
Example 2#
Generate a vector with complex numbers#
!bart vec 1 2+2i 3 4i vector_1
!bart show vector_1
+1.000000e+00+0.000000e+00i +2.000000e+00+2.000000e+00i +3.000000e+00+0.000000e+00i +0.000000e+00+4.000000e+00i