kopia lustrzana https://github.com/Dsplib/libdspl-2.0
some changed in the doc
rodzic
c7fef21597
commit
9897ebeae0
|
@ -22,8 +22,8 @@ h1.groupheader {
|
|||
}
|
||||
|
||||
h2.groupheader {
|
||||
border-bottom: 1px solid #879ECB;
|
||||
color: #354C7B;
|
||||
border-bottom: 1px solid #6DB3D4;
|
||||
color: #235D78;
|
||||
font-size: 150%;
|
||||
font-weight: normal;
|
||||
margin-top: 1.75em;
|
||||
|
@ -97,8 +97,8 @@ h3.version {
|
|||
}
|
||||
|
||||
div.qindex, div.navtab{
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
background-color: #E7F2F8;
|
||||
border: 1px solid #8EC5DE;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
@ -114,13 +114,13 @@ div.navtab {
|
|||
/* @group Link Styling */
|
||||
|
||||
a {
|
||||
color: #3D578C;
|
||||
color: #286B8B;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.contents a:visited {
|
||||
color: #4665A2;
|
||||
color: #2F7FA3;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
|
@ -133,9 +133,9 @@ a.qindex {
|
|||
|
||||
a.qindexHL {
|
||||
font-weight: bold;
|
||||
background-color: #9CAFD4;
|
||||
background-color: #86C0DB;
|
||||
color: #ffffff;
|
||||
border: 1px double #869DCA;
|
||||
border: 1px double #6BB3D4;
|
||||
}
|
||||
|
||||
.contents a.qindexHL:visited {
|
||||
|
@ -179,8 +179,8 @@ pre.fragment {
|
|||
div.fragment {
|
||||
padding: 0px;
|
||||
margin: 4px 8px 4px 2px;
|
||||
background-color: #FBFCFD;
|
||||
border: 1px solid #C4CFE5;
|
||||
background-color: #FAFCFD;
|
||||
border: 1px solid #B7D9EA;
|
||||
}
|
||||
|
||||
div.line {
|
||||
|
@ -296,9 +296,9 @@ div.contents {
|
|||
}
|
||||
|
||||
td.indexkey {
|
||||
background-color: #EBEFF6;
|
||||
background-color: #E7F2F8;
|
||||
font-weight: bold;
|
||||
border: 1px solid #C4CFE5;
|
||||
border: 1px solid #B7D9EA;
|
||||
margin: 2px 0px 2px 0;
|
||||
padding: 2px 10px;
|
||||
white-space: nowrap;
|
||||
|
@ -306,14 +306,14 @@ td.indexkey {
|
|||
}
|
||||
|
||||
td.indexvalue {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #C4CFE5;
|
||||
background-color: #E7F2F8;
|
||||
border: 1px solid #B7D9EA;
|
||||
padding: 2px 10px;
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
||||
tr.memlist {
|
||||
background-color: #EEF1F7;
|
||||
background-color: #EAF4F8;
|
||||
}
|
||||
|
||||
p.formulaDsp {
|
||||
|
@ -396,8 +396,8 @@ span.vhdllogic {
|
|||
}
|
||||
|
||||
blockquote {
|
||||
background-color: #F7F8FB;
|
||||
border-left: 2px solid #9CAFD4;
|
||||
background-color: #F5F9FC;
|
||||
border-left: 2px solid #86C0DB;
|
||||
margin: 0 24px 0 4px;
|
||||
padding: 0 12px 0 16px;
|
||||
}
|
||||
|
@ -430,18 +430,18 @@ td.tiny {
|
|||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #A3B4D7;
|
||||
border: 1px solid #8EC5DE;
|
||||
}
|
||||
|
||||
th.dirtab {
|
||||
background: #EBEFF6;
|
||||
background: #E7F2F8;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border: none;
|
||||
border-top: 1px solid #4A6AAA;
|
||||
border-top: 1px solid #3286AD;
|
||||
}
|
||||
|
||||
hr.footer {
|
||||
|
@ -476,7 +476,7 @@ table.memberdecls {
|
|||
.mdescLeft, .mdescRight,
|
||||
.memItemLeft, .memItemRight,
|
||||
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
|
||||
background-color: #F9FAFC;
|
||||
background-color: #F8FBFC;
|
||||
border: none;
|
||||
margin: 4px;
|
||||
padding: 1px 0 0 8px;
|
||||
|
@ -503,7 +503,7 @@ table.memberdecls {
|
|||
}
|
||||
|
||||
.memTemplParams {
|
||||
color: #4665A2;
|
||||
color: #2F7FA3;
|
||||
white-space: nowrap;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
@ -516,15 +516,15 @@ table.memberdecls {
|
|||
|
||||
.memtitle {
|
||||
padding: 8px;
|
||||
border-top: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-top: 1px solid #94C8E0;
|
||||
border-left: 1px solid #94C8E0;
|
||||
border-right: 1px solid #94C8E0;
|
||||
border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
margin-bottom: -1px;
|
||||
background-image: url('nav_f.png');
|
||||
background-repeat: repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
background-color: #DBECF4;
|
||||
line-height: 1.25;
|
||||
font-weight: 300;
|
||||
float:left;
|
||||
|
@ -539,14 +539,14 @@ table.memberdecls {
|
|||
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #4665A2;
|
||||
color: #2F7FA3;
|
||||
font-weight: normal;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.memnav {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
background-color: #E7F2F8;
|
||||
border: 1px solid #8EC5DE;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
|
@ -584,14 +584,14 @@ table.memberdecls {
|
|||
}
|
||||
|
||||
.memproto, dl.reflist dt {
|
||||
border-top: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-top: 1px solid #94C8E0;
|
||||
border-left: 1px solid #94C8E0;
|
||||
border-right: 1px solid #94C8E0;
|
||||
padding: 6px 0px 6px 0px;
|
||||
color: #253555;
|
||||
color: #173D4F;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
background-color: #DFE5F1;
|
||||
background-color: #D7EAF3;
|
||||
/* opera specific markup */
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
border-top-right-radius: 4px;
|
||||
|
@ -610,11 +610,11 @@ table.memberdecls {
|
|||
}
|
||||
|
||||
.memdoc, dl.reflist dd {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #94C8E0;
|
||||
border-left: 1px solid #94C8E0;
|
||||
border-right: 1px solid #94C8E0;
|
||||
padding: 6px 10px 2px 10px;
|
||||
background-color: #FBFCFD;
|
||||
background-color: #FAFCFD;
|
||||
border-top-width: 0;
|
||||
background-image:url('nav_g.png');
|
||||
background-repeat:repeat-x;
|
||||
|
@ -701,11 +701,11 @@ span.mlabels {
|
|||
}
|
||||
|
||||
span.mlabel {
|
||||
background-color: #728DC1;
|
||||
border-top:1px solid #5373B4;
|
||||
border-left:1px solid #5373B4;
|
||||
border-right:1px solid #C4CFE5;
|
||||
border-bottom:1px solid #C4CFE5;
|
||||
background-color: #54A7CD;
|
||||
border-top:1px solid #3692BC;
|
||||
border-left:1px solid #3692BC;
|
||||
border-right:1px solid #B7D9EA;
|
||||
border-bottom:1px solid #B7D9EA;
|
||||
text-shadow: none;
|
||||
color: white;
|
||||
margin-right: 4px;
|
||||
|
@ -724,8 +724,8 @@ span.mlabel {
|
|||
|
||||
div.directory {
|
||||
margin: 10px 0px;
|
||||
border-top: 1px solid #9CAFD4;
|
||||
border-bottom: 1px solid #9CAFD4;
|
||||
border-top: 1px solid #86C0DB;
|
||||
border-bottom: 1px solid #86C0DB;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -763,7 +763,7 @@ div.directory {
|
|||
|
||||
.directory tr.even {
|
||||
padding-left: 6px;
|
||||
background-color: #F7F8FB;
|
||||
background-color: #F5F9FC;
|
||||
}
|
||||
|
||||
.directory img {
|
||||
|
@ -781,11 +781,11 @@ div.directory {
|
|||
cursor: pointer;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
color: #3D578C;
|
||||
color: #286B8B;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
color: #9CAFD4;
|
||||
color: #86C0DB;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
|
@ -805,7 +805,7 @@ div.directory {
|
|||
height: 14px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
background-color: #728DC1;
|
||||
background-color: #54A7CD;
|
||||
color: white;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
|
@ -870,7 +870,7 @@ div.dynheader {
|
|||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: #2A3D61;
|
||||
color: #1B475C;
|
||||
}
|
||||
|
||||
table.doxtable caption {
|
||||
|
@ -884,12 +884,12 @@ table.doxtable {
|
|||
}
|
||||
|
||||
table.doxtable td, table.doxtable th {
|
||||
border: 1px solid #2D4068;
|
||||
border: 1px solid #1C4D63;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.doxtable th {
|
||||
background-color: #374F7F;
|
||||
background-color: #24607C;
|
||||
color: #FFFFFF;
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
|
@ -899,7 +899,7 @@ table.doxtable th {
|
|||
table.fieldtable {
|
||||
/*width: 100%;*/
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #A8B8D9;
|
||||
border: 1px solid #94C8E0;
|
||||
border-spacing: 0px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
|
@ -915,8 +915,8 @@ table.fieldtable {
|
|||
|
||||
.fieldtable td.fieldtype, .fieldtable td.fieldname {
|
||||
white-space: nowrap;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #94C8E0;
|
||||
border-bottom: 1px solid #94C8E0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
@ -925,7 +925,7 @@ table.fieldtable {
|
|||
}
|
||||
|
||||
.fieldtable td.fielddoc {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #94C8E0;
|
||||
/*width: 100%;*/
|
||||
}
|
||||
|
||||
|
@ -944,9 +944,9 @@ table.fieldtable {
|
|||
.fieldtable th {
|
||||
background-image:url('nav_f.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
background-color: #DBECF4;
|
||||
font-size: 90%;
|
||||
color: #253555;
|
||||
color: #173D4F;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
text-align:left;
|
||||
|
@ -957,7 +957,7 @@ table.fieldtable {
|
|||
-webkit-border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #94C8E0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -979,8 +979,8 @@ table.fieldtable {
|
|||
background-position: 0 -5px;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
color:#8AA0CC;
|
||||
border:solid 1px #C2CDE4;
|
||||
color:#70B5D5;
|
||||
border:solid 1px #B4D8E9;
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
|
@ -995,7 +995,7 @@ table.fieldtable {
|
|||
background-image:url('bc_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
color:#235E79;
|
||||
}
|
||||
|
||||
.navpath li.navelem a
|
||||
|
@ -1004,7 +1004,7 @@ table.fieldtable {
|
|||
display:block;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
color: #283A5D;
|
||||
color: #194457;
|
||||
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
text-decoration: none;
|
||||
|
@ -1012,7 +1012,7 @@ table.fieldtable {
|
|||
|
||||
.navpath li.navelem a:hover
|
||||
{
|
||||
color:#6884BD;
|
||||
color:#48A0C9;
|
||||
}
|
||||
|
||||
.navpath li.footer
|
||||
|
@ -1024,7 +1024,7 @@ table.fieldtable {
|
|||
background-image:none;
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
color:#235E79;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
|
@ -1071,9 +1071,9 @@ div.header
|
|||
{
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
background-color: #F8FBFC;
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid #C4CFE5;
|
||||
border-bottom: 1px solid #B7D9EA;
|
||||
}
|
||||
|
||||
div.headertitle
|
||||
|
@ -1197,9 +1197,10 @@ dl.section dd {
|
|||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #5373B4;
|
||||
border-bottom: 1px solid #3692BC;
|
||||
}
|
||||
|
||||
|
||||
.image
|
||||
{
|
||||
text-align: center;
|
||||
|
@ -1211,6 +1212,7 @@ dl.section dd {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.dotgraph
|
||||
{
|
||||
text-align: center;
|
||||
|
@ -1238,7 +1240,7 @@ dl.section dd {
|
|||
|
||||
div.zoom
|
||||
{
|
||||
border: 1px solid #90A5CE;
|
||||
border: 1px solid #77B9D7;
|
||||
}
|
||||
|
||||
dl.citelist {
|
||||
|
@ -1246,7 +1248,7 @@ dl.citelist {
|
|||
}
|
||||
|
||||
dl.citelist dt {
|
||||
color:#334975;
|
||||
color:#215871;
|
||||
float:left;
|
||||
font-weight:bold;
|
||||
margin-right:10px;
|
||||
|
@ -1260,8 +1262,8 @@ dl.citelist dd {
|
|||
|
||||
div.toc {
|
||||
padding: 14px 25px;
|
||||
background-color: #F4F6FA;
|
||||
border: 1px solid #D8DFEE;
|
||||
background-color: #F2F8FB;
|
||||
border: 1px solid #CFE6F1;
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
float: right;
|
||||
height: auto;
|
||||
|
@ -1279,7 +1281,7 @@ div.toc li {
|
|||
|
||||
div.toc h3 {
|
||||
font: bold 12px/1.2 Arial,FreeSans,sans-serif;
|
||||
color: #4665A2;
|
||||
color: #2F7FA3;
|
||||
border-bottom: 0 none;
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -1531,7 +1533,7 @@ table.markdownTable {
|
|||
}
|
||||
|
||||
table.markdownTable td, table.markdownTable th {
|
||||
border: 1px solid #2D4068;
|
||||
border: 1px solid #1C4D63;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
|
@ -1539,12 +1541,12 @@ table.markdownTableHead tr {
|
|||
}
|
||||
|
||||
table.markdownTableBodyLeft td, table.markdownTable th {
|
||||
border: 1px solid #2D4068;
|
||||
border: 1px solid #1C4D63;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone {
|
||||
background-color: #374F7F;
|
||||
background-color: #24607C;
|
||||
color: #FFFFFF;
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
|
@ -1571,7 +1573,7 @@ table.markdownTable {
|
|||
}
|
||||
|
||||
table.markdownTable td, table.markdownTable th {
|
||||
border: 1px solid #2D4068;
|
||||
border: 1px solid #1C4D63;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Doxyfile 1.8.14
|
||||
# Doxyfile 1.8.13
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
|
@ -20,8 +20,8 @@
|
|||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
|
|||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
|
@ -708,7 +708,7 @@ LAYOUT_FILE =
|
|||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
|
@ -801,7 +801,7 @@ INPUT = ru \
|
|||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
|
@ -1053,7 +1053,7 @@ SOURCE_TOOLTIPS = YES
|
|||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
|
@ -1099,17 +1099,6 @@ CLANG_ASSISTED_PARSING = NO
|
|||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
|
||||
# were built. This is equivalent to specifying the "-p" option to a clang tool,
|
||||
# such as clang-check. These options will then be pased to the parser.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse-libclang=ON option for CMake.
|
||||
# The default value is: 0.
|
||||
|
||||
CLANG_COMPILATION_DATABASE_PATH= 0
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1200,7 +1189,7 @@ HTML_FOOTER = footer.html
|
|||
# obsolete.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_STYLESHEET = doxy_stylesheet.css
|
||||
HTML_STYLESHEET = doxygen_style.css
|
||||
|
||||
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# cascading style sheets that are included after the standard style sheets
|
||||
|
@ -1228,13 +1217,13 @@ HTML_EXTRA_FILES =
|
|||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_HUE = 199
|
||||
|
||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
|
||||
# in the HTML output. For a value of 0 the output will use grayscales only. A
|
||||
|
@ -1264,17 +1253,6 @@ HTML_COLORSTYLE_GAMMA = 80
|
|||
|
||||
HTML_TIMESTAMP = YES
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
|
@ -1298,12 +1276,12 @@ HTML_INDEX_NUM_ENTRIES = 100
|
|||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: https://developer.apple.com/tools/xcode/), introduced with
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
@ -1419,7 +1397,7 @@ QCH_FILE =
|
|||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1427,7 +1405,8 @@ QHP_NAMESPACE = org.doxygen.Project
|
|||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1435,21 +1414,23 @@ QHP_VIRTUAL_FOLDER = doc
|
|||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
@ -1517,7 +1498,7 @@ GENERATE_TREEVIEW = NO
|
|||
# Minimum value: 0, maximum value: 20, default value: 4.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
ENUM_VALUES_PER_LINE = 8
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
|
||||
# to set the initial width (in pixels) of the frame in which the tree is shown.
|
||||
|
@ -1542,7 +1523,7 @@ EXT_LINKS_IN_WINDOW = NO
|
|||
|
||||
FORMULA_FONTSIZE = 14
|
||||
|
||||
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
|
@ -1554,7 +1535,7 @@ FORMULA_FONTSIZE = 14
|
|||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
|
@ -1581,7 +1562,7 @@ MATHJAX_FORMAT = HTML-CSS
|
|||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
|
@ -1643,7 +1624,7 @@ SERVER_BASED_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/).
|
||||
# Xapian (see: http://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
|
@ -1656,7 +1637,7 @@ EXTERNAL_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
|
@ -1843,7 +1824,7 @@ LATEX_SOURCE_CODE = NO
|
|||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -2026,9 +2007,9 @@ DOCBOOK_PROGRAMLISTING = NO
|
|||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
|
||||
# the structure of the code including all documentation. Note that this feature
|
||||
# is still experimental and incomplete at the moment.
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
@ -2243,7 +2224,7 @@ HIDE_UNDOC_RELATIONS = NO
|
|||
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
|
||||
# Bell Labs. The other options in this section have no effect if this option is
|
||||
# set to NO
|
||||
# The default value is: NO.
|
||||
# The default value is: YES.
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
|
@ -2399,7 +2380,9 @@ DIRECTORY_GRAPH = YES
|
|||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
|
||||
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# The default value is: png.
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -1,8 +1,14 @@
|
|||
<!-- HTML header for doxygen 1.8.13-->
|
||||
<!-- HTML header for doxygen 1.8.13
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
@ -14,11 +20,12 @@
|
|||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="http://dsplib.org/header_footer.css" rel="stylesheet">
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
|
||||
|
||||
<link href="http://dsplib.org/header_footer.css" rel="stylesheet">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
|
151
dspl/src/array.c
151
dspl/src/array.c
|
@ -3,7 +3,7 @@
|
|||
* Digital Signal Processing Library [http://dsplib.org]
|
||||
*
|
||||
* This file is part of libdspl-2.0.
|
||||
*
|
||||
*
|
||||
* is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
|
@ -25,77 +25,130 @@
|
|||
#include "dspl.h"
|
||||
|
||||
|
||||
/**************************************************************************************************
|
||||
/******************************************************************************
|
||||
Concntenate arrays
|
||||
***************************************************************************************************/
|
||||
*******************************************************************************/
|
||||
int DSPL_API concat(void* a, size_t na, void *b, size_t nb, void* c)
|
||||
{
|
||||
if(!a || !b || !c || c == b)
|
||||
if(!a || !b || !c || c == b)
|
||||
return ERROR_PTR;
|
||||
if(na < 1 || nb < 1)
|
||||
return ERROR_SIZE;
|
||||
|
||||
if(c != a)
|
||||
|
||||
if(c != a)
|
||||
memcpy(c, a, na);
|
||||
|
||||
memcpy((char*)c+na, b, nb);
|
||||
return RES_OK;
|
||||
memcpy((char*)c+na, b, nb);
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
decimate real vector
|
||||
*******************************************************************************/
|
||||
int DSPL_API decimate(double* x, int n, int dec, double* y, int* cnt)
|
||||
{
|
||||
int k = 0, i = 0;
|
||||
if(!x || !y)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(dec < 1)
|
||||
return ERROR_NEGATIVE;
|
||||
|
||||
/**************************************************************************************************
|
||||
Flip real array in place
|
||||
***************************************************************************************************/
|
||||
k = i = 0;
|
||||
while(k + dec < n)
|
||||
{
|
||||
y[i] = x[k];
|
||||
k+=dec;
|
||||
i++;
|
||||
}
|
||||
if(cnt)
|
||||
*cnt = i;
|
||||
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
decimate complex vector
|
||||
*******************************************************************************/
|
||||
int DSPL_API decimate_cmplx(complex_t* x, int n, int dec,
|
||||
complex_t* y, int* cnt)
|
||||
{
|
||||
int k = 0, i = 0;
|
||||
if(!x || !y)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(dec < 1)
|
||||
return ERROR_NEGATIVE;
|
||||
|
||||
k = i = 0;
|
||||
while(k + dec < n)
|
||||
{
|
||||
RE(y[i]) = RE(x[k]);
|
||||
IM(y[i]) = IM(x[k]);
|
||||
k+=dec;
|
||||
i++;
|
||||
}
|
||||
if(cnt)
|
||||
*cnt = i;
|
||||
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Flip real array in place
|
||||
*******************************************************************************/
|
||||
int DSPL_API flipip(double* x, int n)
|
||||
{
|
||||
int k;
|
||||
double tmp;
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n<1)
|
||||
return ERROR_SIZE;
|
||||
|
||||
for(k = 0; k < n/2; k++)
|
||||
{
|
||||
tmp = x[k];
|
||||
x[k] = x[n-1-k];
|
||||
x[n-1-k] = tmp;
|
||||
}
|
||||
return RES_OK;
|
||||
int k;
|
||||
double tmp;
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n<1)
|
||||
return ERROR_SIZE;
|
||||
|
||||
for(k = 0; k < n/2; k++)
|
||||
{
|
||||
tmp = x[k];
|
||||
x[k] = x[n-1-k];
|
||||
x[n-1-k] = tmp;
|
||||
}
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************************
|
||||
Flip complex array in place
|
||||
***************************************************************************************************/
|
||||
/******************************************************************************
|
||||
Flip complex array in place
|
||||
*******************************************************************************/
|
||||
int DSPL_API flipip_cmplx(complex_t* x, int n)
|
||||
{
|
||||
int k;
|
||||
complex_t tmp;
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n<1)
|
||||
return ERROR_SIZE;
|
||||
|
||||
for(k = 0; k < n/2; k++)
|
||||
{
|
||||
RE(tmp) = RE(x[k]);
|
||||
RE(x[k]) = RE(x[n-1-k]);
|
||||
RE(x[n-1-k]) = RE(tmp);
|
||||
int k;
|
||||
complex_t tmp;
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n<1)
|
||||
return ERROR_SIZE;
|
||||
|
||||
IM(tmp) = IM(x[k]);
|
||||
IM(x[k]) = IM(x[n-1-k]);
|
||||
IM(x[n-1-k]) = IM(tmp);
|
||||
}
|
||||
return RES_OK;
|
||||
for(k = 0; k < n/2; k++)
|
||||
{
|
||||
RE(tmp) = RE(x[k]);
|
||||
RE(x[k]) = RE(x[n-1-k]);
|
||||
RE(x[n-1-k]) = RE(tmp);
|
||||
|
||||
IM(tmp) = IM(x[k]);
|
||||
IM(x[k]) = IM(x[n-1-k]);
|
||||
IM(x[n-1-k]) = IM(tmp);
|
||||
}
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -70,6 +70,57 @@ int DSPL_API fourier_series_dec(double* t, double* s, int nt,
|
|||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
Fourier Series Decomposition for complex input signal
|
||||
*******************************************************************************/
|
||||
int DSPL_API fourier_series_dec_cmplx(double* t, complex_t* s, int nt,
|
||||
double period, int nw, double* w, complex_t* y)
|
||||
{
|
||||
int k, m;
|
||||
double dw = M_2PI / period;
|
||||
complex_t e[2];
|
||||
|
||||
if(!t || !s || !w || !y)
|
||||
return ERROR_PTR;
|
||||
if(nt<1 || nw < 1)
|
||||
return ERROR_SIZE;
|
||||
if(period <= 0.0)
|
||||
return ERROR_NEGATIVE;
|
||||
|
||||
memset(y, 0 , nw*sizeof(complex_t));
|
||||
|
||||
for(k = 0; k < nw; k++)
|
||||
{
|
||||
w[k] = (k - nw/2) * dw;
|
||||
RE(e[1]) = RE(s[0]) * cos(w[k] * t[0]) +
|
||||
IM(s[0]) * sin(w[k] * t[0]);
|
||||
IM(e[1]) = -RE(s[0]) * sin(w[k] * t[0]) +
|
||||
IM(s[0]) * cos(w[k] * t[0]);
|
||||
for(m = 1; m < nt; m++)
|
||||
{
|
||||
RE(e[0]) = RE(e[1]);
|
||||
IM(e[0]) = IM(e[1]);
|
||||
RE(e[1]) = RE(s[m]) * cos(w[k] * t[m]) +
|
||||
IM(s[m]) * sin(w[k] * t[m]);
|
||||
IM(e[1]) = -RE(s[m]) * sin(w[k] * t[m]) +
|
||||
IM(s[m]) * cos(w[k] * t[m]);
|
||||
RE(y[k]) += 0.5 * (RE(e[0]) + RE(e[1]))*(t[m] - t[m-1]);
|
||||
IM(y[k]) += 0.5 * (IM(e[0]) + IM(e[1]))*(t[m] - t[m-1]);
|
||||
}
|
||||
RE(y[k]) /= period;
|
||||
IM(y[k]) /= period;
|
||||
}
|
||||
|
||||
if(!(nw%2))
|
||||
RE(y[0]) = RE(y[1]) = 0.0;
|
||||
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
121
dspl/src/inout.c
121
dspl/src/inout.c
|
@ -3,7 +3,7 @@
|
|||
* Digital Signal Processing Library [http://dsplib.org]
|
||||
*
|
||||
* This file is part of DSPL.
|
||||
*
|
||||
*
|
||||
* is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
|
@ -42,45 +42,45 @@ void DSPL_API dspl_info()
|
|||
|
||||
|
||||
/******************************************************************************
|
||||
Write a real array to the binary file "fn"
|
||||
Write a real array to the binary file "fn"
|
||||
*******************************************************************************/
|
||||
int DSPL_API writebin(void* x, int n, int dtype, char* fn)
|
||||
{
|
||||
int k, res;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
|
||||
pFile = fopen(fn, "wb");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
||||
|
||||
if(fwrite(&dtype, sizeof(int), 1, pFile) != 1)
|
||||
{
|
||||
{
|
||||
res = ERROR_FWRITE_SIZE;
|
||||
goto exit_label;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(fwrite(&n, sizeof(int), 1, pFile) != 1)
|
||||
{
|
||||
{
|
||||
res = ERROR_FWRITE_SIZE;
|
||||
goto exit_label;
|
||||
}
|
||||
|
||||
k = 1;
|
||||
if(fwrite(&k, sizeof(int), 1, pFile) != 1)
|
||||
{
|
||||
{
|
||||
res = ERROR_FWRITE_SIZE;
|
||||
goto exit_label;
|
||||
};
|
||||
|
||||
|
||||
switch(dtype)
|
||||
{
|
||||
case DAT_DOUBLE:
|
||||
|
@ -91,13 +91,13 @@ int DSPL_API writebin(void* x, int n, int dtype, char* fn)
|
|||
}
|
||||
break;
|
||||
case DAT_COMPLEX:
|
||||
if(fwrite((complex_t*)x,
|
||||
if(fwrite((complex_t*)x,
|
||||
sizeof(complex_t), n, pFile) != n)
|
||||
{
|
||||
res = ERROR_FWRITE_SIZE;
|
||||
goto exit_label;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
res = ERROR_DAT_TYPE;
|
||||
goto exit_label;
|
||||
|
@ -106,7 +106,7 @@ int DSPL_API writebin(void* x, int n, int dtype, char* fn)
|
|||
exit_label:
|
||||
if(pFile)
|
||||
fclose(pFile);
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
@ -115,20 +115,20 @@ exit_label:
|
|||
|
||||
|
||||
/******************************************************************************
|
||||
Write a real arrays to the text file "fn"
|
||||
Write a real arrays to the text file "fn"
|
||||
*******************************************************************************/
|
||||
int DSPL_API writetxt(double* x, double *y, int n, char* fn)
|
||||
{
|
||||
int k;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
|
||||
pFile = fopen(fn, "w+");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
@ -139,9 +139,9 @@ int DSPL_API writetxt(double* x, double *y, int n, char* fn)
|
|||
else
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\n", x[k]);
|
||||
|
||||
|
||||
fclose(pFile);
|
||||
return RES_OK;
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,33 +152,33 @@ int DSPL_API writetxt(double* x, double *y, int n, char* fn)
|
|||
/******************************************************************************
|
||||
* Write a 3d plot data to file "fn" (pgfplots3d accepteble)
|
||||
******************************************************************************/
|
||||
int DSPL_API writetxt_3d(double* x, int nx, double *y, int ny,
|
||||
int DSPL_API writetxt_3d(double* x, int nx, double *y, int ny,
|
||||
double* z, char* fn)
|
||||
{
|
||||
int k, n;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
|
||||
if(!x || !y || !z)
|
||||
return ERROR_PTR;
|
||||
if(nx < 1 || ny < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
|
||||
pFile = fopen(fn, "w+");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
||||
|
||||
for(k = 0; k < ny; k++)
|
||||
{
|
||||
for(n = 0; n < nx; n++)
|
||||
fprintf(pFile, "%+.12E\t%+.12E\t%+.12E\n",
|
||||
fprintf(pFile, "%+.12E\t%+.12E\t%+.12E\n",
|
||||
x[n], y[k], z[n+k*nx]);
|
||||
fprintf(pFile, "\n");
|
||||
|
||||
|
||||
}
|
||||
fclose(pFile);
|
||||
return RES_OK;
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,22 +194,87 @@ int DSPL_API writetxt_3dline(double* x, double *y, double* z, int n, char* fn)
|
|||
{
|
||||
int k;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
|
||||
if(!x || !y || !z)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
|
||||
pFile = fopen(fn, "w+");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
||||
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\t%+.12E\t%+.12E\n", x[k], y[k], z[k]);
|
||||
fprintf(pFile, "\n");
|
||||
fclose(pFile);
|
||||
return RES_OK;
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Write a real part of coplex array to the text file "fn"
|
||||
*******************************************************************************/
|
||||
int DSPL_API writetxt_cmplx_re(double* x, complex_t *y, int n, char* fn)
|
||||
{
|
||||
int k;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
pFile = fopen(fn, "w+");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
||||
if(x)
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\t%+.12E\n", x[k], RE(y[k]));
|
||||
else
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\n", RE(y[k]));
|
||||
|
||||
fclose(pFile);
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Write a image part of coplex array to the text file "fn"
|
||||
*******************************************************************************/
|
||||
int DSPL_API writetxt_cmplx_im(double* x, complex_t *y, int n, char* fn)
|
||||
{
|
||||
int k;
|
||||
FILE* pFile = NULL;
|
||||
|
||||
if(!x)
|
||||
return ERROR_PTR;
|
||||
if(n < 1)
|
||||
return ERROR_SIZE;
|
||||
if(!fn)
|
||||
return ERROR_FNAME;
|
||||
|
||||
pFile = fopen(fn, "w+");
|
||||
if(pFile == NULL)
|
||||
return ERROR_FOPEN;
|
||||
|
||||
if(x)
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\t%+.12E\n", x[k], IM(y[k]));
|
||||
else
|
||||
for(k = 0; k < n; k++)
|
||||
fprintf(pFile, "%+.12E\n", IM(y[k]));
|
||||
|
||||
fclose(pFile);
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ p_conv conv ;
|
|||
p_conv_cmplx conv_cmplx ;
|
||||
p_conv_fft_cmplx conv_fft_cmplx ;
|
||||
p_cos_cmplx cos_cmplx ;
|
||||
p_decimate decimate ;
|
||||
p_decimate_cmplx decimate_cmplx ;
|
||||
p_dft dft ;
|
||||
p_dft_cmplx dft_cmplx ;
|
||||
p_dmod dmod ;
|
||||
|
@ -83,6 +85,7 @@ p_fft_shift_cmplx fft_shift_cmplx ;
|
|||
p_flipip flipip ;
|
||||
p_flipip_cmplx flipip_cmplx ;
|
||||
p_fourier_series_dec fourier_series_dec ;
|
||||
p_fourier_series_dec_cmplx fourier_series_dec_cmplx;
|
||||
p_fourier_series_rec fourier_series_rec ;
|
||||
p_freqs freqs ;
|
||||
p_freqs_cmplx freqs_cmplx ;
|
||||
|
@ -121,7 +124,8 @@ p_writebin writebin ;
|
|||
p_writetxt writetxt ;
|
||||
p_writetxt_3d writetxt_3d ;
|
||||
p_writetxt_3dline writetxt_3dline ;
|
||||
|
||||
p_writetxt_cmplx_im writetxt_cmplx_im ;
|
||||
p_writetxt_cmplx_re writetxt_cmplx_re ;
|
||||
#endif //BUILD_LIB
|
||||
|
||||
|
||||
|
@ -188,6 +192,8 @@ void* dspl_load()
|
|||
LOAD_FUNC(conv_cmplx);
|
||||
LOAD_FUNC(conv_fft_cmplx);
|
||||
LOAD_FUNC(cos_cmplx);
|
||||
LOAD_FUNC(decimate);
|
||||
LOAD_FUNC(decimate_cmplx);
|
||||
LOAD_FUNC(dft);
|
||||
LOAD_FUNC(dft_cmplx);
|
||||
LOAD_FUNC(dmod);
|
||||
|
@ -220,6 +226,7 @@ void* dspl_load()
|
|||
LOAD_FUNC(flipip);
|
||||
LOAD_FUNC(flipip_cmplx);
|
||||
LOAD_FUNC(fourier_series_dec);
|
||||
LOAD_FUNC(fourier_series_dec_cmplx);
|
||||
LOAD_FUNC(fourier_series_rec);
|
||||
LOAD_FUNC(freqz);
|
||||
LOAD_FUNC(freqs);
|
||||
|
@ -258,7 +265,8 @@ void* dspl_load()
|
|||
LOAD_FUNC(writetxt);
|
||||
LOAD_FUNC(writetxt_3d);
|
||||
LOAD_FUNC(writetxt_3dline);
|
||||
|
||||
LOAD_FUNC(writetxt_cmplx_im);
|
||||
LOAD_FUNC(writetxt_cmplx_re);
|
||||
|
||||
#ifdef WIN_OS
|
||||
return (void*)handle;
|
||||
|
|
|
@ -297,6 +297,18 @@ DECLARE_FUNC(int, cos_cmplx, complex_t*
|
|||
COMMA int
|
||||
COMMA complex_t*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, decimate, double* x
|
||||
COMMA int n
|
||||
COMMA int dec
|
||||
COMMA double* y
|
||||
COMMA int* cnt);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, decimate_cmplx, complex_t* x
|
||||
COMMA int n
|
||||
COMMA int dec
|
||||
COMMA complex_t* y
|
||||
COMMA int* cnt);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, dft, double*
|
||||
COMMA int
|
||||
COMMA complex_t*);
|
||||
|
@ -456,6 +468,14 @@ DECLARE_FUNC(int, fourier_series_dec, double*
|
|||
COMMA double*
|
||||
COMMA complex_t*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, fourier_series_dec_cmplx, double* t
|
||||
COMMA complex_t* s
|
||||
COMMA int nt
|
||||
COMMA double period
|
||||
COMMA int nw
|
||||
COMMA double* w
|
||||
COMMA complex_t* y);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, fourier_series_rec, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
|
@ -677,6 +697,17 @@ DECLARE_FUNC(int, writetxt_3dline, double* x
|
|||
COMMA double* z
|
||||
COMMA int n
|
||||
COMMA char* fn);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, writetxt_cmplx_im, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
COMMA char*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, writetxt_cmplx_re, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
COMMA char*);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -51,6 +51,8 @@ p_conv conv ;
|
|||
p_conv_cmplx conv_cmplx ;
|
||||
p_conv_fft_cmplx conv_fft_cmplx ;
|
||||
p_cos_cmplx cos_cmplx ;
|
||||
p_decimate decimate ;
|
||||
p_decimate_cmplx decimate_cmplx ;
|
||||
p_dft dft ;
|
||||
p_dft_cmplx dft_cmplx ;
|
||||
p_dmod dmod ;
|
||||
|
@ -83,6 +85,7 @@ p_fft_shift_cmplx fft_shift_cmplx ;
|
|||
p_flipip flipip ;
|
||||
p_flipip_cmplx flipip_cmplx ;
|
||||
p_fourier_series_dec fourier_series_dec ;
|
||||
p_fourier_series_dec_cmplx fourier_series_dec_cmplx;
|
||||
p_fourier_series_rec fourier_series_rec ;
|
||||
p_freqs freqs ;
|
||||
p_freqs_cmplx freqs_cmplx ;
|
||||
|
@ -121,7 +124,8 @@ p_writebin writebin ;
|
|||
p_writetxt writetxt ;
|
||||
p_writetxt_3d writetxt_3d ;
|
||||
p_writetxt_3dline writetxt_3dline ;
|
||||
|
||||
p_writetxt_cmplx_im writetxt_cmplx_im ;
|
||||
p_writetxt_cmplx_re writetxt_cmplx_re ;
|
||||
#endif //BUILD_LIB
|
||||
|
||||
|
||||
|
@ -188,6 +192,8 @@ void* dspl_load()
|
|||
LOAD_FUNC(conv_cmplx);
|
||||
LOAD_FUNC(conv_fft_cmplx);
|
||||
LOAD_FUNC(cos_cmplx);
|
||||
LOAD_FUNC(decimate);
|
||||
LOAD_FUNC(decimate_cmplx);
|
||||
LOAD_FUNC(dft);
|
||||
LOAD_FUNC(dft_cmplx);
|
||||
LOAD_FUNC(dmod);
|
||||
|
@ -220,6 +226,7 @@ void* dspl_load()
|
|||
LOAD_FUNC(flipip);
|
||||
LOAD_FUNC(flipip_cmplx);
|
||||
LOAD_FUNC(fourier_series_dec);
|
||||
LOAD_FUNC(fourier_series_dec_cmplx);
|
||||
LOAD_FUNC(fourier_series_rec);
|
||||
LOAD_FUNC(freqz);
|
||||
LOAD_FUNC(freqs);
|
||||
|
@ -258,7 +265,8 @@ void* dspl_load()
|
|||
LOAD_FUNC(writetxt);
|
||||
LOAD_FUNC(writetxt_3d);
|
||||
LOAD_FUNC(writetxt_3dline);
|
||||
|
||||
LOAD_FUNC(writetxt_cmplx_im);
|
||||
LOAD_FUNC(writetxt_cmplx_re);
|
||||
|
||||
#ifdef WIN_OS
|
||||
return (void*)handle;
|
||||
|
|
|
@ -297,6 +297,18 @@ DECLARE_FUNC(int, cos_cmplx, complex_t*
|
|||
COMMA int
|
||||
COMMA complex_t*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, decimate, double* x
|
||||
COMMA int n
|
||||
COMMA int dec
|
||||
COMMA double* y
|
||||
COMMA int* cnt);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, decimate_cmplx, complex_t* x
|
||||
COMMA int n
|
||||
COMMA int dec
|
||||
COMMA complex_t* y
|
||||
COMMA int* cnt);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, dft, double*
|
||||
COMMA int
|
||||
COMMA complex_t*);
|
||||
|
@ -456,6 +468,14 @@ DECLARE_FUNC(int, fourier_series_dec, double*
|
|||
COMMA double*
|
||||
COMMA complex_t*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, fourier_series_dec_cmplx, double* t
|
||||
COMMA complex_t* s
|
||||
COMMA int nt
|
||||
COMMA double period
|
||||
COMMA int nw
|
||||
COMMA double* w
|
||||
COMMA complex_t* y);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, fourier_series_rec, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
|
@ -677,6 +697,17 @@ DECLARE_FUNC(int, writetxt_3dline, double* x
|
|||
COMMA double* z
|
||||
COMMA int n
|
||||
COMMA char* fn);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, writetxt_cmplx_im, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
COMMA char*);
|
||||
//------------------------------------------------------------------------------
|
||||
DECLARE_FUNC(int, writetxt_cmplx_re, double*
|
||||
COMMA complex_t*
|
||||
COMMA int
|
||||
COMMA char*);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
### Start multiplot (2x2 layout)
|
||||
|
||||
set terminal wxt 0 size 800,640 enhanced font 'Verdana,8' position 0,0
|
||||
unset key
|
||||
set multiplot layout 4,2 rowsfirst
|
||||
|
|
|
@ -11,7 +11,6 @@ int main()
|
|||
dspl_info(); // Print DSPL information
|
||||
|
||||
dspl_free(handle); // free dspl handle
|
||||
getch();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,43 +3,126 @@
|
|||
#include <math.h>
|
||||
#include "dspl.h"
|
||||
|
||||
#define N 1000
|
||||
#define N 8000
|
||||
|
||||
|
||||
|
||||
void r2hdb(double* r, double* h, double* hdb, double ep2, int n)
|
||||
{
|
||||
int k;
|
||||
for(k = 0; k < n; k++)
|
||||
{
|
||||
r[k] *= r[k];
|
||||
h[k] = 1.0/(1.0 + ep2 * r[k]);
|
||||
hdb[k] = 10.0*log10(h[k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
double w[N], r[N], h[N];
|
||||
double ep2, Gp2;
|
||||
int ord, k;
|
||||
void* handle;
|
||||
handle = dspl_load();
|
||||
if(!handle)
|
||||
{
|
||||
printf("cannot to load libdspl!\n");
|
||||
return 0;
|
||||
}
|
||||
double w[N]; // время (сек)
|
||||
double r[N]; // входной сигнал
|
||||
double h[N], hdb[N];
|
||||
double ep2, Rp, Rs, es2, m;
|
||||
int ord, k;
|
||||
|
||||
void* handle; // DSPL handle
|
||||
handle = dspl_load(); // Load DSPL function
|
||||
|
||||
// заполняю массив частот в логарифмическом формате от 0.01 до 100
|
||||
logspace(-2, 2, N, DSPL_PERIODIC, w);
|
||||
|
||||
|
||||
ord = 4; // порядок фильтра
|
||||
Rp = 0.3; // Неравномерность в полосе пропускания (дБ)
|
||||
Rs = 15.0; // Уровень подавления в полосе заграждения (дБ)
|
||||
|
||||
// Параметры ep^2 и es^2
|
||||
ep2 = pow(10.0, Rp*0.1) - 1.0;
|
||||
es2 = pow(10.0, Rs*0.1) - 1.0;
|
||||
|
||||
// вывод на печать параметров ep^2 и es^2
|
||||
printf("ep^2 = %.4f\n", ep2);
|
||||
printf("es^2 = %.4f\n", es2);
|
||||
|
||||
|
||||
|
||||
|
||||
//**********************************************************************
|
||||
// Расчет F_N^2(w) и |H(jw)|^2 фильтра Баттерворта
|
||||
//**********************************************************************
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
r[k] = pow(w[k], (double)(ord));
|
||||
}
|
||||
r2hdb(r, h, hdb, ep2, N);
|
||||
|
||||
// сохранение в файлы результатов расчета фильтра Баттерворта
|
||||
writetxt(w, r, N, "dat/butter_r.txt");
|
||||
writetxt(w, h, N, "dat/butter_h.txt");
|
||||
writetxt(w, hdb, N, "dat/butter_hdb.txt");
|
||||
|
||||
|
||||
|
||||
linspace(0, 2.5, N, DSPL_PERIODIC, w);
|
||||
|
||||
|
||||
//**********************************************************************
|
||||
// Расчет F_N^2(w) и |H(jw)|^2 фильтра Чебышева 1-го рода
|
||||
//**********************************************************************
|
||||
cheby_poly1(w, N, ord, r);
|
||||
r2hdb(r, h, hdb, ep2, N);
|
||||
// сохранение в файлы результатов расчета фильтра Чебышева 1-го рода
|
||||
writetxt(w, r, N, "dat/cheby1_r.txt");
|
||||
writetxt(w, h, N, "dat/cheby1_h.txt");
|
||||
writetxt(w, hdb, N, "dat/cheby1_hdb.txt");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//**********************************************************************
|
||||
// Расчет F_N^2(w) и |H(jw)|^2 фильтра Чебышева 2-го рода
|
||||
//**********************************************************************
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
w[k] = 1.0 / w[k];
|
||||
}
|
||||
cheby_poly1(w, N, ord, r);
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
r[k] =1.0 / (r[k] *r[k]);
|
||||
h[k] = 1.0/(1.0 + es2*r[k]);
|
||||
hdb[k] = 10.0*log10(h[k]);
|
||||
}
|
||||
logspace(-2, 2, N, DSPL_PERIODIC, w);
|
||||
// сохранение в файлы результатов расчета фильтра Чебышева 1-го рода
|
||||
writetxt(w, r, N, "dat/cheby2_r.txt");
|
||||
writetxt(w, h, N, "dat/cheby2_h.txt");
|
||||
writetxt(w, hdb, N, "dat/cheby2_hdb.txt");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//**********************************************************************
|
||||
// Расчет F_N^2(w) и |H(jw)|^2 эллиптического фильтра
|
||||
//**********************************************************************
|
||||
ellip_modulareq(Rp, Rs, ord, &m); // пересчет эллиптического модуля
|
||||
printf("modular m = %.3f\n", m); // вывод на печать
|
||||
// расчет эллиптической рациональной функции
|
||||
ellip_rat(w, N, ord, m, r);
|
||||
r2hdb(r, h, hdb, ep2, N);
|
||||
// сохранение в файлы результатов расчета эллиптического фильтра
|
||||
writetxt(w, r, N, "dat/ellip_r.txt");
|
||||
writetxt(w, h, N, "dat/ellip_h.txt");
|
||||
writetxt(w, hdb, N, "dat/ellip_hdb.txt");
|
||||
|
||||
ord = 4;
|
||||
Gp2 = 0.9;
|
||||
ep2 = 1.0 / Gp2 -1;
|
||||
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
r[k] = pow(w[k], (double)(ord));
|
||||
r[k] *= r[k];
|
||||
h[k] = 6.0/(1.0 + ep2*r[k]);
|
||||
|
||||
w[k] *= 4;
|
||||
}
|
||||
|
||||
writetxt(w, h, N, "dat/butter_approx.txt");
|
||||
|
||||
|
||||
// remember to free the resource
|
||||
dspl_free(handle);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
dspl_free(handle); // free dspl handle
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "common.h"
|
||||
#include "dspl.h"
|
||||
#include "plot.h"
|
||||
|
||||
#define N 1000
|
||||
#define T 4.0
|
||||
#define A 2.0
|
||||
#define M 41
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
double t[N]; // время (сек)
|
||||
double s[N]; // входной сигнал
|
||||
complex_t S[M]; // комплексный спектр периодического сигнала
|
||||
double Smag[M]; // амплитудный спектр периодического сигнала
|
||||
double w[M]; // частота (рад/c) дискретного спектра
|
||||
double wc[N]; // частота (рад/с) огибающей спектра
|
||||
double Sc[N]; // огибающая спектра
|
||||
double tau; // длительность импульса
|
||||
|
||||
// скважность
|
||||
double Q[3] = {5.0, 2.0, 1.25};
|
||||
|
||||
int q, m, n;
|
||||
char fname[64];
|
||||
|
||||
|
||||
for(q = 0; q < 3; q++)
|
||||
{
|
||||
tau = T/Q[q];
|
||||
|
||||
// заполнение массива временных отсчетов
|
||||
// на 4-x периодах повторения сигнала
|
||||
// для отображения на осциллограмме
|
||||
linspace(-T*2.0, T*2.0, N, DSPL_PERIODIC, t);
|
||||
|
||||
// 4 периода повторения п-импульса скважности Q[q]
|
||||
signal_pimp(t, N, A, tau, 0.0, T, s);
|
||||
|
||||
// сохранение в текстовый файл
|
||||
sprintf(fname, "dat/pimp_time_%.2lf.csv", Q[q]);
|
||||
writetxt(t, s, N, fname);
|
||||
|
||||
|
||||
// заполнение массива временных отсчетов
|
||||
// на одном периоде повторения сигнала
|
||||
linspace(-T/2.0, T/2.0, N, DSPL_PERIODIC, t);
|
||||
|
||||
// один период повторения п-импульса скважности Q[q]
|
||||
signal_pimp(t, N, A, tau, 0.0, T, s);
|
||||
|
||||
// разложение в ряд Фурье
|
||||
fourier_series_dec(t, s, N, T, M, w, S);
|
||||
|
||||
// Рассчет амплитудного спектра
|
||||
for(m = 0; m < M; m++)
|
||||
{
|
||||
printf("S[%d] = %f %f\n", m, RE(S[m]), IM(S[m]));
|
||||
Smag[m] = ABS(S[m]);
|
||||
}
|
||||
// Сохранение в файл амплитудного спетра для скважности Q[q]
|
||||
sprintf(fname, "dat/pimp_freq_discrete_%.2lf.csv", Q[q]);
|
||||
writetxt(w, Smag, M, fname);
|
||||
|
||||
// Вектор частот непрерывной огибаюхей вида sin(w/2*tau) / (w/2*T)
|
||||
linspace(w[0], w[M-1], N, DSPL_SYMMETRIC, wc);
|
||||
|
||||
// Расчет огибающей
|
||||
for(n = 0; n < N; n++)
|
||||
Sc[n] = (wc[n] == 0.0) ? A/Q[q] : fabs( A * sin(0.5*wc[n]*tau) / (0.5*wc[n] * T));
|
||||
|
||||
// сохранение огибающей в файл для скважности Q[q]
|
||||
sprintf(fname, "dat/pimp_freq_cont_%.2lf.csv", Q[q]);
|
||||
writetxt(wc, Sc, N, fname);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "dspl.h"
|
||||
|
||||
|
||||
#define N 200000
|
||||
#define T 4.0
|
||||
#define A 2.0
|
||||
#define M 121
|
||||
#define TAU 1.0
|
||||
#define DEC 50
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
double* t = NULL; // время (сек)
|
||||
double* s = NULL; // входной сигнал
|
||||
complex_t* sc = NULL;
|
||||
complex_t S[M]; // комплексный спектр периодического сигнала
|
||||
double Smag[M]; // амплитудный спектр периодического сигнала
|
||||
double Sphi[M]; // фазовый спектр периодического сигнала
|
||||
double w[M]; // частота (рад/c) дискретного спектра
|
||||
|
||||
void* handle;
|
||||
int k, i;
|
||||
handle = dspl_load();
|
||||
if(!handle)
|
||||
{
|
||||
printf("cannot to load libdspl!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
t = (double*)malloc(N*sizeof(double));
|
||||
s = (double*)malloc(N*sizeof(double));
|
||||
sc = (complex_t*)malloc(N*sizeof(complex_t));
|
||||
|
||||
// массив времени
|
||||
linspace(-T*2.0, T*2.0, N, DSPL_PERIODIC, t);
|
||||
|
||||
// 4 периода повторения п-импульса
|
||||
signal_pimp(t, N, A, TAU, 0.0, T, s);
|
||||
|
||||
// расчет спектра
|
||||
fourier_series_dec(t, s, N, T, M, w, S);
|
||||
|
||||
for(k = 0; k < M; k++)
|
||||
{
|
||||
Smag[k] = ABS(S[k])/4.0;
|
||||
Sphi[k] = atan2(IM(S[k]), RE(S[k]));
|
||||
}
|
||||
writetxt(w, Smag, M, "dat/fourier_series_prop_spectrum_amp_a.txt");
|
||||
writetxt(w, Sphi, M, "dat/fourier_series_prop_spectrum_phi_a.txt");
|
||||
|
||||
double w0 = 10.0*M_PI;
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
RE(sc[k]) = s[k] * cos(w0*t[k]);
|
||||
IM(sc[k]) = s[k] * sin(w0*t[k]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// разложение в ряд Фурье
|
||||
fourier_series_dec_cmplx(t, sc, N, T, M, w, S);
|
||||
for(k = 0; k < M; k++)
|
||||
{
|
||||
Smag[k] = ABS(S[k])/4.0;
|
||||
Sphi[k] = atan2(IM(S[k]), RE(S[k]));
|
||||
}
|
||||
writetxt(w, Smag, M, "dat/fourier_series_prop_spectrum_amp_se.txt");
|
||||
writetxt(w, Sphi, M, "dat/fourier_series_prop_spectrum_phi_se.txt");
|
||||
|
||||
|
||||
|
||||
|
||||
// сохраняю в файл dat/fourier_series_prop_time_a.txt
|
||||
decimate(t, N, DEC, t, &i);
|
||||
decimate(s, N, DEC, s, &i);
|
||||
writetxt(t, s, i, "dat/fourier_series_prop_time_a.txt");
|
||||
|
||||
decimate_cmplx(sc, N, DEC, sc, &i);
|
||||
writetxt_cmplx_re(t, sc, i, "dat/fourier_series_prop_time_se_re.txt");
|
||||
writetxt_cmplx_im(t, sc, i, "dat/fourier_series_prop_time_se_im.txt");
|
||||
|
||||
// массив времени
|
||||
linspace(-T*2.0, T*2.0, N, DSPL_PERIODIC, t);
|
||||
// 4 периода повторения п-импульса
|
||||
signal_pimp(t, N, A, TAU, 0.0, T, s);
|
||||
|
||||
for(k = 0; k < N; k++)
|
||||
{
|
||||
s[k] *= cos(w0*t[k]);
|
||||
}
|
||||
|
||||
|
||||
// разложение в ряд Фурье
|
||||
fourier_series_dec(t, s, N, T, M, w, S);
|
||||
for(k = 0; k < M; k++)
|
||||
{
|
||||
Smag[k] = ABS(S[k])/4.0;
|
||||
Sphi[k] = atan2(IM(S[k]), RE(S[k]));
|
||||
}
|
||||
writetxt(w, Smag, M, "dat/fourier_series_prop_spectrum_amp_sc.txt");
|
||||
writetxt(w, Sphi, M, "dat/fourier_series_prop_spectrum_phi_sc.txt");
|
||||
|
||||
|
||||
// сохраняю в файл dat/fourier_series_prop_time_sc.txt
|
||||
decimate(t, N, DEC, t, &i);
|
||||
decimate(s, N, DEC, s, &i);
|
||||
writetxt(t, s, i, "dat/fourier_series_prop_time_sc.txt");
|
||||
|
||||
|
||||
free(s);
|
||||
free(t);
|
||||
free(sc);
|
||||
return 0;
|
||||
}
|
Ładowanie…
Reference in New Issue