Question: Sort Arrays of MAtrix to Ordered Pairs

Hi

I need sort data of an imported matrix to ordered pairs.

'M' is a matrix with 2 columns and unknown numbers of row.

 

with(LinearAlgebra):

M := RandomMatrix(12, 2);

pairs := [M[1], M[2], ... , M[numelems(DeleteColumn(M, [1]))]];

with(CurveFitting):

PolynomialInterpolation(pairs, x);

Please Wait...