You can't really do that in Mathematica as the new position must be there already. Btw, I never really like this feature in Matlab. I do not think it is good. Because someone by mistake could do this, using wrong index, and not know about it, as Matlab will silently expands the matrix. In Mathematica you get a real error message, which is much better.
Explicit is always better than implicit when it comes to coding.
But easy enough to make your own little expand function.
(m={{1,2,3},{4,5,6},{7,8,9}})//MatrixForm

myExpand[m,4]//MatrixForm

myExpand[m,5]//MatrixForm

myExpand[m, 2] // MatrixForm

myExpand[m, 8] // MatrixForm

code
myExpand[mat_?MatrixQ, (newSize_Integer)?Positive] := Module[{t, currentSize = Length@mat}, If[newSize <= currentSize, t = mat[[1 ;; newSize, 1 ;; newSize]] , t = Table[0, {newSize}, {newSize}]; t[[1 ;; currentSize, 1 ;; currentSize]] = mat ]; t ]
ps. If you wanted 1 on diagonal and not zeros, then just replace the line
t = Table[0, {newSize}, {newSize}];
with
t = IdentityMatrix[newSize];
so now myExpand[m, 5] // MatrixForm gives

As you can see from the others answers, in Mathematica, there are always at least 10 different ways to do the same thing, and you pick the one that you prefer most.
SparseArraydocumentation $\endgroup$SparseArray[m, {5, 5}, 0] // Normal. $\endgroup$m('in-place modification'), and which I suspect MATLAB is doing, or whether you want to create a new matrixk. For in-place modification, maybem//=MapAt[1&,{{4,4},{5,5}}]@ArrayPad[#,{0,2}]&(usingApplyTo) $\endgroup$