MATLAB's documentation is really useful and readable. It tells us how to use MATLAB. It has working examples too. You can search it using your favorite internet search engine: this will find theofficial,correct andrecommended ways of using MATLAB. The first link above includes the title"Creating Multi-Dimensional Arrays" at the top of the page. Perhaps you might like to read this.