Feature #826

Stack sum and multiply operators for gmt/grdmath

Added by Paul almost 2 years ago. Updated almost 2 years ago.

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

0%

Category:-
Target version:Candidate for next minor release
Platform:

Description

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.

History

#1 Updated by Paul almost 2 years ago

  • Tracker changed from Bug to Feature

Also available in: Atom PDF