discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Tim Meehan
Subject: Re: [Discuss-gnuradio] Problem: Reading a file
Date: Mon, 28 Jan 2008 19:05:31 -0800

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 <address@hidden> wrote:

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 -2.0272687e+000 -2.0880410e+000  2.0832361e+000 -1.8686237e+000  1.9233531e+000  3.0267080e+000

Should I change the contents of the input file so that GNU Radio can read it properly?

Thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]