Streams and Vectors: Difference between revisions
Mattcarrick (talk | contribs) No edit summary |
Mattcarrick (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
''Vectors'' carry multiple samples per time instance, representing data in parallel. By analogy, a ''stream'' represents a scalar at each time instance whereas a vector represents an array at each time instance. | ''Vectors'' carry multiple samples per time instance, representing data in parallel. By analogy, a ''stream'' represents a scalar at each time instance whereas a vector represents an array at each time instance. | ||
GRC uses lighter colors to represent ''streams and darker colors to represent ''vector'' outputs: | GRC uses lighter colors to represent ''streams'' and darker colors to represent ''vector'' outputs: | ||
[[File:StreamVectorDarkerColors.png|600px]] | [[File:StreamVectorDarkerColors.png|600px]] |
Revision as of 18:15, 6 January 2022
This tutorial will describe the difference between a Stream and a Vector. You can find the previous tutorial here: Converting Data Types
Streams
Streams in GNU Radio are what convey the information between blocks and are represented by the arrows connecting blocks in a flowgraph. A stream must have a data type, such as Float 32 or Byte. A stream carries 1 sample for each time instance and are used to represent and process serial data.
The Signal Source block produces a Complex Float 32 stream. The output of the block at each time instance contains 1 complex sample:
Vectors
Vectors carry multiple samples per time instance, representing data in parallel. By analogy, a stream represents a scalar at each time instance whereas a vector represents an array at each time instance.
GRC uses lighter colors to represent streams and darker colors to represent vector outputs:
Streams and Vectors Flowgraph Example
The following example will describe how to convert a stream to a vector and back to a stream.