
Both happen on a mat, both are barefoot, and from the doorway they look like variations of the same class. They are not.
Yoga links breath to movement and holds shapes long enough for you to notice what is tight. Mat pilates works closer to the middle of the body, in smaller ranges, with more repetition and more counting.
If your back complains after long desk days, start with pilates. If what you want is an hour where your head goes quiet, start with yoga. Most people who stay end up doing both.