Whatever: can be defined in two ways
1) example: "whatever happens"
meaning: if anything happens.............whatever in this sense means that anything and everything
2) example: " I don't care, whatever!"
meaning: when you do not care about the subject of topic.
No matter what means that if anything happens
example: "no matter what, I will be there"
meaning: if anything happens, you will be there