help-octave
[Top][All Lists]
Advanced

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

freqz Matlab Incompatibility


From: Thomas D. Dean
Subject: freqz Matlab Incompatibility
Date: Fri, 18 Aug 2017 14:07:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

From a matlab example, I get an error - Matlab incompatibility??

http://www.aaronscher.com/wireless_com_SDR/RTL_SDR_AM_spectrum_demod.html

rtl_sdr -f 100500000 -g 40 -s 2500000 -n 25000000 /tmp/FMcapture1.dat

read 100.5 MHz gain 40db 2.5e6 samples/sec 10 seconds output to file

fid = fopen('/tmp/FMcapture1.dat','rb');
y = fread(fid,'uint8=>double');
# y is 8-bit i and q data from an rtlsdr,
y = fread(fid,'uint8=>double');
y = y-127.5;
y = y(1:2:end) + i*y(2:2:end);

plot([1:5000], y(1:5000)); ## looks reasonable

freqz(y(1:5000),1,[-4E6:0.01e6:4E6],2.5E6);
error: __plt2vv__: vector lengths must match
error: called from
    __plt__>__plt2vv__ at line 489 column 5
    __plt__>__plt2__ at line 248 column 14
    __plt__ at line 113 column 17
    plot at line 223 column 10
    freqz_plot at line 55 column 3
    freqz at line 194 column 5

Tom Dean



reply via email to

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