I would highly recommend against picking up another character to deal with a match-up in any situation. If you're losing, that's a symptom of you doing something wrong and identifies a problem area in your play. By switching characters, you might have an easier time winning against that same Marth, but you're not fixing the problems that you had, you're just putting a band-aid on top.
Like Sabreknight said, you can't play super aggressively against Marth because it's super easy to mis-space and get punished. In Marth dittos, generally it's the grounded Marth that has the advantage. You can't approach with a raw fair or nair, as they'll outrange you with ftilt or fsmash. It can be tough to get a raw grab on Marth, but dtilt into dash-forward grab is good for catching their grounded approach. Stage positioning is super important in Marth dittos too. Because it's so easy for Marth to get Marth offstage, you always want to be controlling center stage, and you don't want to just give it up to try an get a little bit more damage. If you grab them at the edge and throw them offstage, you can catch them with an fsmash if they DI in.
Edit: One other thing. If they fsmash your shield, you can wavedash out-of-shield and get a grab while they're still in lag. If you can do that consistently, you'll never lose to another nooby Marth, because that trick alone will give you an opportunity to punish every time you enter their range.