discuss-gnuradio
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
[Discuss-gnuradio] saving a complex data into a file
From
:
Jose Torres Diaz
Subject
:
[Discuss-gnuradio] saving a complex data into a file
Date
:
Tue, 30 Oct 2012 20:54:29 +1030
Hi Community,
I'm trying to save complex data from a block into a file, in order to process the information later on. My code is very simple, as shown bellow:
//Definition of values
std::vector<float> complex_values(4);
complex_values[0]=(-0.707,-0.707);
complex_values[1]=(0.707,-0.707);
complex_values[2]=(-0.707,0.707);
omplex_values[3]=(0.707,0.707);
myfile.open ("/home/usrpvm/Desktop/examples/binary_complex");
myfile <<(char*)&complex_values[0];
myfile <<(char*)&complex_values[1];
myfile <<(char*)&complex_values[2];
myfile <<(char*)&complex_values[3];
When I finish, I check my values with hexdump command:
hexdump binary_complex -v -e ' 2/4 "%10f "' -e '"\n"'
-0.707000 -0.707000
0.707000 0.707000
-0.707000 0.707000
0.707000 0.707000
0.707000 0.707000
As you can see, there are more values that I'm saving and there are some values missing. I think I am doing something wrong when I save the values.
Anyone can point me to the right direction?
Thanks for your time,
Jose.
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
[Discuss-gnuradio] saving a complex data into a file
,
Jose Torres Diaz
<=
Re: [Discuss-gnuradio] saving a complex data into a file
,
Josh Blum
,
2012/10/31
Re: [Discuss-gnuradio] saving a complex data into a file
,
Jose Torres
,
2012/10/31
Prev by Date:
[Discuss-gnuradio] Changing Bit Rate in GRC
Next by Date:
Re: [Discuss-gnuradio] gnuradio-companion & hamlib bodging
Previous by thread:
[Discuss-gnuradio] Changing Bit Rate in GRC
Next by thread:
Re: [Discuss-gnuradio] saving a complex data into a file
Index(es):
Date
Thread