3

There is a data file data.dat which contains:

1   1   1   2   2   6   1
2   4   1   4   1   7   1
3   1   1   6   1   6   1
4   1   1   8   9   76  1
5   1   1   16  1   1   1
6   6   1   9   1   2   1
7   1   1   7   1   99  1
8   8   1   5   8   1   1
9   1   1   3   1   0   1
10  1   1   2   1   1   1

Using gnuplot we can find maximum value for a particular column (say 4th column) by using

stats "data.dat" u 4

My original file has more than 100 rows and columns, it's a large array of numbers. I need to find the maximum value from the entire array (here it is 99). Is there some trick in gnuplot to do so?

2
  • 1
    Try stats "data.dat" matrix u 3 Commented Feb 15, 2017 at 22:26
  • @Christoph Works! stats "data.dat" matrix works too, i.e. without mention of any column. Exactly what I needed, thank you! Commented Feb 15, 2017 at 22:29

1 Answer 1

1

To get the maximum valueof a matrix use

stats "data.dat" matrix
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.