For removing the spikes, I would recommend looking into the function filloutliers. Since your data isn't meant to be terribly consistent, you will likely need to use a windowed approach, which is further detailed in its documentation.
For your plotting error, you are attempting to index into a table without specifying where on the table you wish to index into. I'm not sure what part you're trying to access, but you should be using methods found here.
Cheers,
Jakeb