Closed stackprogramer closed 7 years ago
Not sure I understand what you need or what the problem ist. The output should always be complex. If you only need the real part, simply discard the imag
Complex output is set here: https://github.com/kit-cel/simulink-hackrf/blob/master/src/hackrf_source.c#L88
i used two strategy:
one i edited your source and make :
ssSetOutputPortComplexSignal(S, 0, COMPLEX_NO);
Now we have not error real in matlab,other strategy is block or using block complex matlab,but
two strategy has same errros for FM RTL-SDR example.
MATLAB System block 'HF/FM Broadcast Demodulator Baseband' error occurred when invoking 'validateInputsImpl' method of 'comm.FMBroadcastDemodulator'. The error was thrown from ' 'K:\MATLAB\R2016a\toolbox\shared\coder\coder+coder+internal\errorIf.m' at line 8 'K:\MATLAB\R2016a\toolbox\comm\comm+comm\FMBroadcastDemodulator.m' at line 211'. Caused by: The signal length (number of rows) must be a multiple of the decimation factor: 30. The decimation factor can also be obtained using the info method.
so i think i changed output frame length for hackrfone. it is deafult 2^12, i changed it to 2^power,power 2,4,.... same error when i set to 30 it messages it should set to factor 512. and..... i am searching for solving this problem.Your Source is Great like charm but we should edit examples of matlab for working with our source. thanks
I looks like all you need is a Buffer block to adjust the frame length. That said, this does not seem to be an issue of the source block - nor should it be modified to solve this IMO.
So, I am closing this. Please consult the simulink manual.
hi, it can be better with adding feature int8 for output source because examples rtl-sdr and usrp work with source real int8,if it is possible for source output hackrf one be int8, i read source code your library , but i am not sure it is possible or not. thanks very much