Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
8b1932b5
Commit
8b1932b5
authored
Jan 07, 2019
by
thomas.forbriger
Browse files
libpsdxx [WP][FEATURE]: implement function lin_frequency
parent
f2410a25
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/libpsdxx/function_lin_frequency.cc
View file @
8b1932b5
...
...
@@ -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 ----- */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment