When you specify [] for the size, the values from the index array ascertain the dimensions on the output. The dimension lengths in sz ought to match or exceed the dimension lengths while in the index array. Although buying the knowledge of MATLAB you ought to have a hand on https://edwinmnonm.mybuzzblog.com/19594114/the-5-second-trick-for-matlab-assignment-helper