The problem has nothing to do with loops, it occurs solely because you are trying to allocate multiple elements into one element:
x(k) = x(k-1)*[3;2;1]
An element of a numeric matrix contains one value. You cannot put multiple elements into one element of a matrix.
The indexing here also makes no sense, because indexing starts with one:
k = 1;
x(k-1) = [1;1;1]
I suspect that you want to use subscript indexing, something like this:
k = 1;
mat = nan(3,14);
mat(:,k) = [1;1;1];
while k<14
k = k+1;
mat(:,k)= mat(:,k-1).*[3;2;1];
end
although really using a for loop would be preferable:
N = 14;
mat = nan(3,N);
mat(:,1) = [1;1;1];
for k = 2:N
mat(:,k)= mat(:,k-1).*[3;2;1];
end
