How to Convert an "int8" baseband IQ signal into "int16" in MATLAB?

2 visualizzazioni (ultimi 30 giorni)
Hi there,
I hope you will be doing fine. I am a GNSS researcher and a PhD candidate. I am working on GPS L1 C/A baseband signal and have recorded an IF signal for 120 seconds using RTL SDR. The signal file is saved in int8 and now I would like to convert it into int16 or int32.
Is it possible?
If yes how to do it? of course I wouldn't ask people to write a full algorithm for me but I just need a track. BTW I have also attached a signal file for those who want to give it a try.
Thank you so much in advance

Risposte (1)

Suraj Kumar
Suraj Kumar 4 minuti fa
To convert a baseband IQ signal stored in a .bin file from int8 data type to int16 using MATLAB, you can refer to the following steps:
1. You can use the fopen function to open the file and fread function to read the data as int8.
2. Now you can convert the data into int16 data type by using the int16 function in MATLAB.
You can refer to the following code snippet for better understanding:
fileID = fopen(filePath, 'r');
dataInt8 = fread(fileID, 'int8');
fclose(fileID);
dataInt16 = int16(dataInt8);
To learn more about converting the data type in MATLAB, you can refer to the following documentation:

Categorie

Scopri di più su Signal Processing Toolbox in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by