0
$\begingroup$

i have this function:

CreateMatrix[maxRows_, maxColumns_] := {
  Rows = RandomInteger[{2, maxRows}];
  Columns = RandomInteger[{2, maxColumns}];

  Mat = RandomInteger[{-100, 100}, {Rows, Columns}];

  FirstRow = Mat[[1]];
  SecondRow = Mat[[2]];

  Print[Mat // MatrixForm];
}

Do you have any ideas, how to plot a point graph(from function) via ListPlot?

FirstRow are X values, SecondRow are Y values, like this:

FirstRow = {x1, x2, x3, ...}; SencondRow = {y1, y2, y3, ...};

Thanks!

$\endgroup$

1 Answer 1

3
$\begingroup$

Use Transpose function, it would be like:

ListPlot[Transpose[{row,col}]]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.