123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // Academic License - for use in teaching, academic research, and meeting
- // course requirements at degree granting institutions only. Not for
- // government, commercial, or other organizational use.
- // File: AbstractPhaseCodedWaveform.cpp
- //
- // MATLAB Coder version : 5.3
- // C/C++ source code generated on : 26-Apr-2023 23:47:33
- //
- // Include Files
- #include "AbstractPhaseCodedWaveform201.h"
- #include "../rt_nonfinite.h"
- #include "../coder_array.h"
- #include <math.h>
- // Function Definitions
- //
- // Arguments : creal_T s[20000]
- // Return Type : void
- //
- namespace coder {
- namespace phased {
- void AbstractPhaseCodedWaveform201::getMatchingWaveform(creal_T s[20000])
- {
- array<creal_T, 1U> x;
- int exponent;
- int ibtile;
- int jtilecol;
- signed char b_s[20000];
- signed char c_s[20000];
- for (jtilecol = 0; jtilecol < 5000; jtilecol++) {
- ibtile = jtilecol << 2;
- b_s[ibtile] = 1;
- b_s[ibtile + 1] = 1;
- b_s[ibtile + 2] = -1;
- b_s[ibtile + 3] = 1;
- }
- frexp(20000.0, &exponent);
- x.set_size(20000);
- for (jtilecol = 0; jtilecol < 20000; jtilecol++) {
- x[jtilecol].re = 0.0;
- x[jtilecol].im = 0.0;
- x[jtilecol].re = 1.0;
- x[jtilecol].im = 0.0;
- }
- for (jtilecol = 0; jtilecol < 4; jtilecol++) {
- for (ibtile = 0; ibtile < 5000; ibtile++) {
- c_s[ibtile + 5000 * jtilecol] = b_s[jtilecol + (ibtile << 2)];
- }
- }
- for (jtilecol = 0; jtilecol < 20000; jtilecol++) {
- ibtile = c_s[jtilecol];
- s[jtilecol].re = static_cast<double>(ibtile) * x[jtilecol].re;
- s[jtilecol].im = static_cast<double>(ibtile) * x[jtilecol].im;
- }
- }
- } // namespace phased
- } // namespace coder
- //
- // File trailer for AbstractPhaseCodedWaveform.cpp
- //
- // [EOF]
- //
|