Questions regarding the colon notation in MATLAB -


i have come across following notation in matlab

y(:, :, :, 2) = y(:, :, :, 1);   y(:, 1, :, 4) = y(:, 1, :, 3); 

y(:)?

is there general rule on : notation.

thanks

all elements in dimension. example,

> a=[2, 3, 4; 0, 5, 7] =    2   3   4    0   5   7 > a(:, 2) ans =    3    5 > a(1, :) ans =    2   3   4