Mutants and Masterminds, though marketted as a supers system, is honestly a generic one.
Most supers systems are, really.
So M&M could do fantasy just fine.
And since there shouldn't be a whole lot of difference between building a caster and any other PC. Just choose powers. If it belongs in a matrix because it's the exact same "power" but being used to create a different effect, it's a matrix, like fire control for damage, fire control for dazzle, can't do both at once, it's a matrix.
(note this does weaken casters compared to some systems, since spells will cost based on power level, and they have to pick out what they can do, they're never gonna have a 35 long spell-list unless they're all weak)
Mostly then it would just come down to what kind of Martial?
Are you the ironman/link sort, with an arsenal of magic items?
Martial with some kind of innate magic to their combat, either a fighting style, alternate form, weird racial/heritage powers or maybe they're just Xboxhueg and tough as nails?
Batman martial who focuses primarily on ambush, combat maneuvering and tactics, and planning orchestrated through skills and special moves?
About the only thing you can't do period is "completely human in every way, no superhuman ability not even exceptional strength or speed or accuracy, aided with no magic or technology and completely unlearned at anything but basic combat."
Because the system acknowledges that that's just a normal guard NPC, and not something actually capable of heroics going toe to toe with much freakier foes. You've got to be exceptional SOMEhow. Those character gen points have to be spent on something, or else your actual power level is much lower.
I'm still debating with myself to build fantasy class templates of sorts for M&M so it's easier for people to pick up and run a game of it in that easy plug-and-play style that D&D has instead of needing to build from the ground up or use its Supers templates which don't follow the same tropes