|
> Try this?
>
> for k = 1:size(indices,1) % in your example 3
>
> temp = from;
> temp(indices(k,:),:) = [];
> A = temp;
>
> end
That doesn't seem to work. I get this error:
??? Index of element to remove exceeds matrix dimensions.
Error in ==> RANSAC_trans_test at 130
temp(indices(i,:),:) = [];
I think I know whats wrong, but not how to correct it.
I don't think I explained myself correctly in the first post. The indices matrix is 10*3
My loop runs from 1 to size(indices,1). The rows of the 'indices' matrix contains the row-numbers that are to be removed from the 'from' matrix.
The first row in 'indices' is [1 2 3], meaning that the rows 1, 2 and 3 needs to be removed from the 'from' matrix in the first iteration.
In the next iteration I need to remove rows 1, 2, 4 from the original 'from' matrix (5*3).
Does that make sense?
Best regards,
Jacob
|