Pre-emphasis filter design
I don't really understand what are you trying to achieve with vector B that has 6 elements. Pre-emphasis filter is defined as:

$$y[n]=x[n]-\alpha x[n-1]$$

Where $\alpha$ is $0.97$ in your case. 

You can see that there are only two elements in vector B, right? So the code should be something like that:

B=[1, -0.97];
xd = filter(B, 1, data, [], 2);


You can verify the frequency response:

freqz(B, 1)