I wish to populate an nxn matrix with vectors. I have the following:
[x y] = meshgrid(a);
for i:size(a,1)
for j:size(a,2)
b = [x(i,j),y(i,j) 0];
end
end
I think may be being a bit naive here as I am expecting a range of different numbers within the vector elements of b. Instead I am getting the elements of b are all equal. also
size(b) = 1 3
size(b(1,1)) = 1 1
I am expecting size(b(1,1)) = 1 3 as each element in b should be a vector of length 3. can someone tell me where I have gone wrong? Thanks very much.
b{i,j} = [x(i,j),y(i,j) 0];
? – Junuxx