calculate SNR and watch a binary file
Markus Feldmann
feldmann_markus at gmx.de
Thu Mar 26 04:16:08 CDT 2009
Francesco Potorti` schrieb:
>>> I can save the spectrum as a binary file.
>>> The file includes several 16 bit complex information.
>>>
>>> How to watch this with octave and calculate
>>> the SNR ?
>
>> i wrote a small script:
>> filename = "spectrum.m";
>> fid = fopen (filename, "r");
>> [val, count] = fread (fid, 100, "uchar", "native")
>> fclose(fid);
>>
>> But i want to watch the original komplex values instead of int values.
>> How to ?
>
> That depends on how the values are written to the file.
>
>> As i know my Spectrum Analyser produces I/Q Signals, so there should be
>> 2*16 bit values. Each 16 bit value is complex.
>
> What you wrote is either a typo or I do not understand it. I suppose
> you meant that each complex value is written as two 16 bit numbers.
> If this is the case, do not use "uchar" but "int16". Then try and see
> if you get the correct numbers, probably the real and complex parts of
> each sample. If not, try to experiment and guess how the numbers are
> written to the file. Or else try to find some documentation on it :)
>
Thanks for your Answer,
in my Spectrum there is an unknown peak in the middle of the FFT-Plot
which exists every time. I think it will be created as byproduct
of a CIC decimation(Digital Down Converter) in my analyser.
Therefor i want to manipulate this complex values, but didn't know how
to ?
Any hints ?
Regards Markus
More information about the Help-octave
mailing list