# What is the difference between Streams To Stream and Streams to Vector

**URL:** <https://www.ruby-forum.com/t/what-is-the-difference-between-streams-to-stream-and-streams-to-vector/242225>\
**Category:** GNU Radio\
**Created:** [June 5, 2015, 9:12pm UTC](https://www.ruby-forum.com/t/what-is-the-difference-between-streams-to-stream-and-streams-to-vector/242225 "2015-06-05T21:12:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 5, 2015, 9:12pm UTC](https://www.ruby-forum.com/t/what-is-the-difference-between-streams-to-stream-and-streams-to-vector/242225/1 "2015-06-05T21:12:26Z")

</div>

Hi all!

I am recording data from two USRP:s and I want to put the data into one  
file sink.  
I think I could do it by using the Streams To Vector block and then  
changing the vector parameter in the file sink to 2.

1. How would I read that data in e.g. Matlab. Right now I am using the  
read\_complex\_binary function when I don’t have a vector input. Is the  
format the same just that every second variable is from element 2 of the  
vector input?

2. There is also the Streams To Stream block. What would the difference  
be  
if I connected that block to the two USRP source blocks and then the  
output  
to a file sink, would that be the same as in Q1?

3. Could I read myself to this information anywhere?

Thank you very much!

Best Regards,

Carl

---

<div class="post-metadata">

**Author:** ![calvin76](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9de053/32.png) [@calvin76](https://www.ruby-forum.com/u/calvin76)\
**Post date:** [June 5, 2015, 9:46pm UTC](https://www.ruby-forum.com/t/what-is-the-difference-between-streams-to-stream-and-streams-to-vector/242225/2 "2015-06-05T21:46:19Z")

</div>

Hi Carl,

I can’t answer the question for you directly, but I can give you a way  
to  
figure it out.

Use two vector source blocks to generate two different known streams.  
The  
first stream vector would be [1,3,5,7,…], a list of odd numbers  
however  
long you want to make it. Set the block to repeat this. The second  
vector  
would be [0,2,4,6,…], a list of even numbers. Feed these two streams  
into  
your Streams to Vector block and dump it to a file. Now inspect the file  
and see how these two streams were merged together.

Hope that helps.

Rich

On Fri, Jun 5, 2015 at 12:11 PM, Carl O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
