<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[C++ Complex Typ nach Pascal]]></title><description><![CDATA[<p>Hallöchen,<br />
Ich habe eine kleine c++ lib die ich gerne nach -<br />
ich mags ja gar nicht schreiben Delphi konvertiere.<br />
Jetzt hänge ich leider an diesen Typ Complex ?<br />
response.real oder imag = 1234 das verstehe ich ja noch<br />
aber response = 10+10+10 ??<br />
Kann mir da jemand helfen wie ich das in Pascal lösen kann ?<br />
Da gibt es ja die JCLComplex.<br />
Vielen Dank schonmal<br />
Totti</p>
<pre><code class="language-cpp">#include &lt;math.h&gt;
#include &lt;complex&gt;

//void BIQUAD::GetFrqResponse(f64 &amp;module_dB, f64 &amp;phase_degree, f64 f_Hz)
// b0, b1, b2, a1, a2: double;            // biquad unquantized coeffs
{
complex response;
double omega;

omega = 2.0*PI*f_Hz/fs;

complex z1(cos(omega),sin(omega));         // Z^(-1)
complex z2(cos(2.0*omega),sin(2.0*omega)); // Z^(-2)

response = (b0 + (b1*z1) + (b2*z2))/(1.0 + (a1*z1) + (a2*z2));

module_dB       = 20.0*log10(sqrt(srd(response.real()) + srd(response.imag())));
phase_degree    = (180.0/PI)*atan2(response.imag(),response.real());
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/165540/c-complex-typ-nach-pascal</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Jul 2026 16:01:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/165540.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Nov 2006 22:51:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++ Complex Typ nach Pascal on Mon, 20 Nov 2006 22:51:11 GMT]]></title><description><![CDATA[<p>Hallöchen,<br />
Ich habe eine kleine c++ lib die ich gerne nach -<br />
ich mags ja gar nicht schreiben Delphi konvertiere.<br />
Jetzt hänge ich leider an diesen Typ Complex ?<br />
response.real oder imag = 1234 das verstehe ich ja noch<br />
aber response = 10+10+10 ??<br />
Kann mir da jemand helfen wie ich das in Pascal lösen kann ?<br />
Da gibt es ja die JCLComplex.<br />
Vielen Dank schonmal<br />
Totti</p>
<pre><code class="language-cpp">#include &lt;math.h&gt;
#include &lt;complex&gt;

//void BIQUAD::GetFrqResponse(f64 &amp;module_dB, f64 &amp;phase_degree, f64 f_Hz)
// b0, b1, b2, a1, a2: double;            // biquad unquantized coeffs
{
complex response;
double omega;

omega = 2.0*PI*f_Hz/fs;

complex z1(cos(omega),sin(omega));         // Z^(-1)
complex z2(cos(2.0*omega),sin(2.0*omega)); // Z^(-2)

response = (b0 + (b1*z1) + (b2*z2))/(1.0 + (a1*z1) + (a2*z2));

module_dB       = 20.0*log10(sqrt(srd(response.real()) + srd(response.imag())));
phase_degree    = (180.0/PI)*atan2(response.imag(),response.real());
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1178110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1178110</guid><dc:creator><![CDATA[totti14]]></dc:creator><pubDate>Mon, 20 Nov 2006 22:51:11 GMT</pubDate></item></channel></rss>