If I have two vectors, how do I use the values in each of those vectors for element-by-element indexing without using a loop.
With loop it will look like this:
for i=1:3 Z(A(i),B(i))=1; end
Solution is >> Z= [0 1 0; 1 0 0; 0 0 1]
I want to this without using the loop.
Following things didnot work:
Thanks for looking into this.