Commit 8b1932b5 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libpsdxx [WP][FEATURE]: implement function lin_frequency

parent f2410a25
......@@ -34,9 +34,25 @@
"PSDXX_FUNCTION_LIN_FREQUENCY_CC V1.0"
#include <psdxx/psd.h>
#include <psdxx/error.h>
namespace psd {
TDseries lin_frequency(const double& df,
unsigned int& nsamples)
{
PSDXX_assert(nsamples>0,
"at least one sample must be present");
TDseries retval(0,nsamples-1);
for (int i=retval.f(); i<=retval.l(); ++i)
{
retval(i)=df*i;
}
return(retval);
} // TDseries lin_frequency(const double& df,
// unsigned int& nsamples)
} // namespace psd
/* ----- END OF function_lin_frequency.cc ----- */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment