From: Andy on
> A(end-200:end)=[];

This line is not doing what you think it's doing. See Oleg's solutions.
 | 
Pages: 1
Prev: Surf plot with NaN
Next: PD Modelling