Advertisement
cd62131

arrays as coefficients

Apr 18th, 2023
2,364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env gnuplot
  2. stats "data.dat" using 1 nooutput
  3. N = STATS_records
  4. array A[N]
  5. array B[N]
  6. stats "data.dat" using (A[$0+1] = $1, B[$0+1] = $2, 0) nooutput
  7. plot for [i=1:N] A[i] * x + B[i] title sprintf("%d * x + %d", A[i], B[i]) with lines
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement