Ohh sorry for missleading topic name ... Thought it is multidimensional since the array runs over {y} and {x} afterwards and it contains itself double with size (z,1). What would be the proper name of this kind of array ?
Nested cell arrays: your examples shows a cell array that contains cell arrays that contain other arrays. That is nesting.
You usage of "multi dim" for nested cell arrays sounds a bit like some other languages which have to resort to nesting of lists to try and mimic any kind of matrix or ND array, but MATLAB natively supports actual ND arrays:
Since apparently it was the correct solution, I'll repost it:
It puzzles me why you would want this without the temporary variable. Putting it on one line is of course trivial. The code below should do what you need.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.