# Gmt math (NORM)

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-math-norm/2433>\
**Category:** Q&A\
**Created:** [December 10, 2021, 4:25am UTC](https://forum.generic-mapping-tools.org/t/gmt-math-norm/2433 "2021-12-10T04:25:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LessandroValente](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/lessandrovalente/32/1900_2.png) [@LessandroValente](https://forum.generic-mapping-tools.org/u/LessandroValente)\
**Post date:** [December 10, 2021, 4:25am UTC](https://forum.generic-mapping-tools.org/t/gmt-math-norm/2433/1 "2021-12-10T04:25:54Z")

</div>

Hello, I have a data matrix with two columns and several lines, the file is in .txt format. I’m trying to apply the function _(NORM)_ from gmt math so that the Y axis normalizes, however, I don’t know how to proceed in the application of this command, can someone help me. Thanks!

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [December 10, 2021, 7:13am UTC](https://forum.generic-mapping-tools.org/t/gmt-math-norm/2433/2 "2021-12-10T07:13:56Z")

</div>

NORM will modify all columns beyond the first so that their range is 1. If you want them to go form 0 to 1 then you need to subtract the lower value, e.g

`gmt math orig.txt NORM DUP LOWER SUB = normalized.txt`

---

<div class="post-metadata">

**Author:** ![LessandroValente](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/lessandrovalente/32/1900_2.png) [@LessandroValente](https://forum.generic-mapping-tools.org/u/LessandroValente)\
**Post date:** [December 13, 2021, 12:30am UTC](https://forum.generic-mapping-tools.org/t/gmt-math-norm/2433/3 "2021-12-13T00:30:54Z")

</div>

This worked perfectly, thanks
