a = [2 4 6 8 10]; % row vector with five elements s = size(a) % store the return value of size() in a new variable s(2) % get the second element of s, i.e. the length along the 2nd dimension size(a,2) % the shortcut