<< mps_col_div Matrix manipulation mps_col_scale >>

mpscilab >> mpscilab > Matrix manipulation > mps_col_exg

mps_col_exg

Swap columns of a matrix

Calling Sequence

mps_col_exg( op, col1, col2 )

Arguments

op

multi-precision matrix

col1, col2

Integer scalar

Description

Exchange the column number col1 with col2 of op. This operation is always performed in-place.

Examples

// Standard usage.
A = [1 -2; 3 -4]
mpsA = mps_init2(A,100)
mps_col_exg(op,1,2)

See Also

<< mps_col_div Matrix manipulation mps_col_scale >>