Feature #826

Stack sum and multiply operators for gmt/grdmath

Added by Paul over 4 years ago. Updated over 4 years ago.

Status:NewStart date:2015-11-28
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:Candidate for next minor release


To avoid very long RPN expressions it would be handy to introduce an operator like SSUM, which would replace all items on the stack with their sum. E.g., instead of

gmt math 1 2 ADD 3 ADD 3 ADD 5 ADD 6 ADD = sum.txt

we could do
gmt math 1 2 3 4 5 6 SSUM = sum.txt

A similar SMUL could deliver the product of all items on the stack. Possible extensions would be SMEAN, SMED, SMODE which would deliver the stack mean, median, and mode values.


#1 Updated by Paul over 4 years ago

  • Tracker changed from Bug to Feature

Also available in: Atom PDF