Re: [Discuss-gnuradio] Problem: Reading a file

2008-01-28 Thread Jonas
Thanks for your help! (Yey!) But I have another problem. It doesn't read the file correctly. For your info, the file has been generated by MATLAB using the -ascii setting. Therefore the file contents look something like this. 1.7011476e+000 -1.6834541e+000 2.6309809e+000 2.1425840e+000 -

Re: [Discuss-gnuradio] Problem: Reading a file

2008-01-28 Thread Tim Meehan
Jason, I don't have a copy of matlab with me so this is going by memory. Try this in matlab to generate a file of floats my_data = rand(1000,1); fid = fopen(foo.dat,w); fwrite(fid, my_data, float32); fclose(fid) Tim On Jan 28, 2008 6:55 PM, Jonas [EMAIL PROTECTED] wrote: Thanks for your

Re: [Discuss-gnuradio] Problem: Reading a file

2008-01-28 Thread George Nychis
Tim Meehan wrote: I don't have a copy of matlab with me so this is going by memory. Try this in matlab to generate a file of floats my_data = rand(1000,1); fid = fopen(foo.dat,w); fwrite(fid, my_data, float32); fclose(fid) So close ;) matlab uses ' instead of my_data = rand(1000,1);

Re: [Discuss-gnuradio] Problem: Reading a file

2008-01-28 Thread Jason Anders
Thanks for your replies! It was helpful! :) ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

[Discuss-gnuradio] Problem: Reading a file

2008-01-23 Thread Jason Anders
I have a problem reading an ascii file. I tried reading it using gr_file_soucrce and extracted it using gr_vector_sink_f. Then I tried extracting the data by using object.data(); or in short, by using its data member. Unfortunately, I always get an empty list. Why is this so? Here's a snippet of