I am trying to create a column vector in matlab based on two 64x64 double vectors, and iterate through each element in the vector and apply an equation to create a new vector, which will then be applied. Here is my code
for i=1:4096,
vector1 = v1(:); %instead of copying the vector this created a 4096X1 double rather than 64X64 for some reason, same with vector2
vector2 = v1(:);
vector1(i) = vector1(i) + 0.05*vector2(i); %for each element in vector1 apply equation to update values.
end
v1(:) = vector1(:); % replace v1 with the new vector1 created on the equation applied
As far as I see this should work, however instead of creating a 64*64 vector a 1*4096 vector is created and I am getting a mismatch error because the vectors are not the same.