ASK and Manchester Encoding Firstly, the context: I've been given a signal in a wav file, the sampling rate and carrier frequency along with the fact it is Manchester encoded and has been ASK Modulated. Five periods of a sinusoidal wave at half frequency of the carrier denote the end of a 'row' and a parity column/row is added. From this I am to reproduce a 300x300 black and white image. My main tool I've been given (never used before) is MatLab. This IS an assignment, and I'm just looking for some answers that I can't find clearly elsewhere. 

So, from what I understand I've got this y[t], which is equal to x[t]*cos(2*pi*1000*t). From this signal I need to try and get x[t] out, then decode it. One of my issues is how to go about extracting this signal.

Sorry for the long start, and if any of this seems basic. It's an introductory course that just throws us in the deep-end all of a sudden!

Question 1: As this is ASK after Manchester Encoding, I'm guessing each 'bit' will be represented by a group of values from the sample that go from either positive to negative or negative to positive? Is my guess correct?

Question 2: In the samples, there are exactly five (or six, I've forgotten at present) zeros between each group of four non-zero numbers (except at the parts which I'm guessing are the five periods denoting the end of a row). Would these zeroes be useful in the demodulation, or are they just introduced during the sampling phase and not useful for demodulation?

Question 3: So, assuming the above questions are correct. To demodulate this signal, would I simply remove all the zero values, then iterate through and denote a '1' when it is positive and a '0' when it is negative (maybe some additional value for when the end of a row is encountered), then pair it up so 10 -> 1 and 01 -> 0?

Many thanks for any help, and sorry once more about the length!
I would suggest you first demodulate your signal. Take the received signal y[t] = x[t]*cos(2*pi*1000*t) and multiply it by cos(2*pi*1000*t). Remember, $ cos(A)cos(B) = 1/2 (cos(A-B) + cos(A+B)) $. You'll be left with x[t]*0.5*(cos(0) + cos(2*pi*2000*t) = x[t]*0.5*1 + x[t]*0.5*cos(2*pi*2000*t). Filtering the remaining signal with a low pass filter at 1k Hz, leaving only x[t]. From there you can try and answer the rest of your questions.

In Matlab this will look like:

t = 0:1/Fs:END_TIME;  % Fs is your sampling rate. This makes a vector of individual time ticks
y_demod = y.*cos(2*pi*1000*t);   % This multiplies every element in Y with the cos(...) 
                                 % ... element. Make sure they're the same size.
a = (1/Fs)*(Fs/4);               % A cutoff frequency of approximately 1/2 the sampling rate
x_est = filter([1 1-a],a,y_demod);


The simple 1-pole low pass filter was taken from here: https://stackoverflow.com/questions/1783633/matlab-apply-a-low-pass-or-high-pass-filter-to-an-array