Please excuse me if the title is a bit arbitrary. I have a matrix and a vector:
A=randi(10,3);D=randi(10,1,3);
Is there anyway to do the following avoiding the loop
A(:,1)-D(1)A(:,2)-D(2)A(:,3)-D(3)
for loopmatrixmatrix manipulationvector
A=randi(10,3);D=randi(10,1,3);
A(:,1)-D(1)A(:,2)-D(2)A(:,3)-D(3)
Best Answer