Instantaneous velocity and displacement from acceleration signal using a proper filtering method
There a a number of conceptual problems with you code.  The first has to do with filtering by zeroing out FFT bins.  This is covered in:

Why is it a bad idea to filter by zeroing out FFT bins?

The second has to do with just taking the real part of the fft.  I don't understand why you did this but this is the wrong way to do the wrong thing.  

If your near term priority is to process your data.  I suggest you discard most of your code and take an entirely different approach with using the built in Matlab timeseries class and use one of the built in filter methods on the object you create. The plot methods are also easy to use and you can set units on the object you create.  This is the most direct way to a "correct" result with your data. 

If you want to understand how to write your own correct code, this will take more time.  There is more than one way to filter data and choosing which takes some time to learn.  You can look at:

What resources are recommended for an introduction to DSP?

Essentially, I'm pointing you at a number of books that are several hundreds of pages of study, which is the long term answer to your problem. You will know what is correct.  

If you do some Googling, you can probably find something in the middle that suits your needs but I can't recommend anything because I don't know what you know and don't know. 

If you may permit the analogy, If one sees someone drowning, do you throw them a floatation device or try to teach them to swim.  

Someone else here may provide a suitable solution. 

It is to your credit that you have shown genuine effort.