I ran this small code to get the indices for the matching values of b in matrix A. The output throws an error.
a = [1 2 3 4];b = [2 3 4 5]; for i = 1:length(b) c(i) = find(a == b(i));end
% —————- OUTPUT ————— %
Improper assignment with rectangular empty matrix.Error in IndicesOfcomputedValues (line 5) c(i) = find(a == b(i));
Best Answer