ECG signals (or any signals) can be inputted through MATLAB, I'm guessing.
Why are you guessing? Have you any evidence that MATLAB can output an ECG signal (whatever that is)?
It hardly makes sense to discuss ways of "filtering" the data when you don't really seem to have a clue what kind of data you will be dealing with OR how you want to "filter" the data.