No problem. It runs fine, using EXACTLY the code you posted.
I will point out that when you report an error, please report the ENTIRE error message, not just what you think is important about that message. So show EVERYTHING in red.
Anyway, I pasted in the code you show, and I get this:
EquityVol = zeros(1,10000);
Liability = zeros(1,10000);
Maturity = zeros(1,10000);
EquityVol(:) = EquityVol2;
Liability(:) = Liability2;
[PD,DD,A,Sa] = mertonmodel(Equity,EquityVol,Liability,Rate,'Maturity',Maturity);
Kind of a boring plot, IMHO, but that is not relevant. :) This was run in R2021b, since it ran using the online version. (I don't have the necessary toolbox myself, but Answers does.)
You will need to be careful that you did not edit code from that toolbox.
You will need to be sure you did not save a file with the same name as a function from that toolbox.