function c = cols(x) % COLS The number of columns. % COLS is a more readable alternative to size(x,2). c = size(x,2);