Demodulate a AM signal from the carrier using Matlab
I suspect that the problem lies in the FIR filter kernel you generate. (-10:10) generates a vector of 21 successive integers [-10, -9, -8 ... 8, 9, 10]. You then perform an elementwise multiplication of said vector by 10, resulting in the vector [-100, -90, -80 ... 80, 90, 100]. Finally you compute the sinc of each element, resulting in the vector [-0.0051, 0.0100, -0.0124 ... -0.0124, 0.0100, -0.0051]. Note that each sample is 10 rad (573 degrees) apart due to that multiplication by 10, which means that your filter is actually designed for a frequency a few times greater than the nyquist frequency at your sample rate. Probably not what you intended, and such a filter won't work at all.