# HG changeset patch
# User P Sudeepam
# Date 1520717220 -19800
# Sun Mar 11 02:57:00 2018 +0530
# Node ID 2a9a06e2b5612d676cff3eb8aabe57b7a3cbb645
# Parent 8ceef8d3b0e139bc301be009decd5403c091db92
[Octave Forge] (signal) new function db2mag: Convert decibels to magnitude
diff -r 8ceef8d3b0e1 -r 2a9a06e2b561 inst/db2mag.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inst/db2mag.m Sun Mar 11 02:57:00 2018 +0530
@@ -0,0 +1,15 @@
+function y = db2mag (ydb)
+
+# Y = DB2MAG(ydb) computes the particular number that has been
+# expressed in its decibel form.
+
+# Dimensionless quantities (eg: Ratios) can be expressed in
+# a logarithmic scale called decibel. This way of expressing
+# these quantities is particularly useful when dealing with
+# very large or very small values of these dimensionless quantities.
+
+if nargin ~= 1
+ error("db2mag: Invalid number of input argumrnts");
+end;
+
+y = 10.^(ydb/20);