modulation – BPSK demodulation on scilab

I have a csv file which contains the time and magnitude of the BPSK modulated waveform.
I now want to demodulate this. Its bitrate is fc/128 (~106 kbit/s) and the carrier frequency is fc/16 (~847 kHz). I tried demodulating it using the below code:

col1 = Array(:, 1);
col2 = Array(:, 2);
t1 = linspace(0,0.00165,20635);


T = 106000;
f = 847000;
t = 0:0.00000008:0.00165;
cosine_func = cos(2*3.14*f*t);

I don’t know what to do next. I am stuck. Can someone please help me with this?

Read more here: Source link