Skip to main content
edited tags; edited title
Link
200_success
  • 144.1k
  • 22
  • 188
  • 473

Is there Eliminating columns from a way to reducematrix where the computation timeentries in this Matlab program?two rows are equal

Source Link
bzak
  • 155
  • 2

Is there a way to reduce the computation time in this Matlab program?

Is there a way to reduce the computation time in this program that eliminates the columns of a matrix A if for a given column the element of line 4 is equal to the element in row 5:

k=1;
for i=1:4000
   if A(4,i) ~= A(5,i)
      B(:,k)=A(:,i);
      k=k+1;
   end
end