Both variants are correct. In everyday language the variant "ein Meter vierzig" seems to be more popular, and many people even say "eins vierzig" if it is clear from the context that it is a length. The question "Wie groß bist Du?" would normally be answered by "eins neunundsiebzig" and not by "eins Komma sieben neun Meter". However, in a scientific context one would rather use the formal "eins Komma sieben neun Meter".
Similar informal expressions like "ein Meter vierzig" or "eins vierzig" are also used for amounts of money:
- Das kostet einen Euro dreißig
- Das macht eins dreißig
I am not aware of other units than "Meter" and "Euro (or any other currency main unit)" where the decimal comma is replaced by the name of the unit and the decimal places are appended in form of a numeral between 1 and 99. In the currency case this may be motivated by the fact that "Euro" has the subunit "Cent" (1 Euro = 100 Cent). The length case is different: "Meter" has many subunits like "Dezimeter, Centimeter, Millimeter, ...", but for some reason the subunit "Centimeter" plays a special role in language use.