Short answer: You can't.
Longer answer: Y o u c a n ' t d o t h a t. Well, not easily. ;-)
Seriously, there is no floating point data type in MATLAB that is longer than a double, UNLESS you are willing to use one of three choices. That is, you can use the symbolic toolbox, or you can use my VPI toolbox, or you can use my HPF toolbox. The latter toolboxes are found on the File Exchange, for free download.
x = sym(2)^300
x = vpi(2)^300
x = hpf(2,100)^300
So I've created the number 2^300 in three distinct ways there in MATLAB. First, as a symbolic toolbox number. Then as an integer, using my VPI. Finally, as a floating point number in 100 digits of precision, using my HPF. (Ok, I guess you can also use some Java big number tools in MATLAB. They are kind of inconvenient though to use, wthout writing an overlay class to use them. I have actually done that for the BigInteger tools, to create my VPIJ class, which essentially replaces and boosts the speed of VPI.)
X = java.math.BigInteger.pow(java.math.BigInteger(2),300)
As a double, this is all you can get, and essentially no more:
format long g
A serious flaw of all three options is they will be relatively slow. That is, if you want to work in high precision, then expect things to get really slow, since MATLAB is highly optimized to work with doubles, but NOT so for other classes of numbers.
Two other tools already in MATLAB will allow you to work over a slightly larger set of integers than a double will allow. Thus in integer form you can use int64 and uint64. But a double stops at 2^53-1 to represent integers eactly, whereas uint64 goes up only to 2^64-1. Hardly worth the bother for a few more powers of 2.
In the end, you are best off if you learn to do your work in double precision. This is the art and skill of numerical analysis, learning how to do computations without resorting to the lazy but terribly slow solution of high precision.