<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from pow2db.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="pow2db" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>pow2db</refname>
    <refpurpose>Convert power values to decibels (dB).</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   ydb = pow2db(y)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>y:</term>
            <listitem><para> Input power values (scalar, vector, or matrix). Must be non-negative.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
The `pow2db` function converts power values specified in `y` to decibels (dB) using the formula:
ydb = 10 * log10(y).
If `y` contains zeros, the corresponding `ydb` values are set to -Inf.
If `y` contains negative values, an error is raised.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Convert a single power value to dB:
y = 2000;
ydb = pow2db(y)

   ]]></programlisting>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Debdeep Dey</member>
   </simplelist>
</refsection>
</refentry>
