I want to swap two specific rows of a Matrix. I do not want to write a second function just for that and I am looking for the easiest/quickest way possible.
In Matlab or Octave in order to swap the k-th and r-th row of a Matrix A we could simply write:
A([k r],:) = A([r k],:)
When I try this on Julia (VsCode) I get this error: ERROR: LoadError: syntax: “[k r]” is not a valid function argument name around File Path
Is there another way? I do not want to have a function just to swap rows.
Thanks in advance