PhaseCodedWaveform203.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //
  2. // Academic License - for use in teaching, academic research, and meeting
  3. // course requirements at degree granting institutions only. Not for
  4. // government, commercial, or other organizational use.
  5. // File: PhaseCodedWaveform203.cpp
  6. //
  7. // MATLAB Coder version : 5.3
  8. // C/C++ source code generated on : 26-Apr-2023 23:54:03
  9. //
  10. // Include Files
  11. #include "PhaseCodedWaveform203.h"
  12. // Function Definitions
  13. //
  14. // Arguments : void
  15. // Return Type : PhaseCodedWaveform203
  16. //
  17. namespace coder {
  18. namespace phased {
  19. PhaseCodedWaveform203::PhaseCodedWaveform203()
  20. {
  21. matlabCodegenIsDeleted = true;
  22. }
  23. //
  24. // Arguments : void
  25. // Return Type : void
  26. //
  27. PhaseCodedWaveform203::~PhaseCodedWaveform203()
  28. {
  29. matlabCodegenDestructor();
  30. }
  31. //
  32. // Arguments : creal_T s[10000]
  33. // Return Type : void
  34. //
  35. void PhaseCodedWaveform203::getMatchingWaveform(creal_T s[10000])
  36. {
  37. int ibtile;
  38. int k;
  39. signed char b_s[10000];
  40. signed char c_s[10000];
  41. for (k = 0; k < 2500; k++) {
  42. ibtile = k << 2;
  43. b_s[ibtile] = 1;
  44. b_s[ibtile + 1] = 1;
  45. b_s[ibtile + 2] = -1;
  46. b_s[ibtile + 3] = 1;
  47. }
  48. for (k = 0; k < 10000; k++) {
  49. s[k].re = 1.0;
  50. s[k].im = 0.0;
  51. }
  52. for (k = 0; k < 4; k++) {
  53. for (ibtile = 0; ibtile < 2500; ibtile++) {
  54. c_s[ibtile + 2500 * k] = b_s[k + (ibtile << 2)];
  55. }
  56. }
  57. for (k = 0; k < 10000; k++) {
  58. ibtile = c_s[k];
  59. s[k].re *= static_cast<double>(ibtile);
  60. s[k].im *= static_cast<double>(ibtile);
  61. }
  62. }
  63. //
  64. // Arguments : void
  65. // Return Type : void
  66. //
  67. void PhaseCodedWaveform203::matlabCodegenDestructor()
  68. {
  69. if (!matlabCodegenIsDeleted) {
  70. matlabCodegenIsDeleted = true;
  71. if (isInitialized == 1) {
  72. isInitialized = 2;
  73. }
  74. }
  75. }
  76. } // namespace phased
  77. } // namespace coder
  78. //
  79. // File trailer for PhaseCodedWaveform203.cpp
  80. //
  81. // [EOF]
  82. //