C++ implementation for array/ vector of complex values? [closed]

  c++, c++14, c++17

This is the code i have tried , but i don’t know how to get complex values into 2d vector.

#include <vector>
#include <iostream>
using namespace std;

int main(){
    auto fft_filter(Mat frame){
    struct retVals{
    vector<vector<float>>(250, vector<float(3));
    vector<float>freq(313);
    };
    return retVals{vec,freq};
}

This is the kind of values of the 2d array/vector.

[[ 3.99141309e+00-0.00000000e+00j  3.91016374e+00-0.00000000e+00j
     4.39229138e+00-0.00000000e+00j]
   [ 2.99674001e+00-0.00000000e+00j  3.09360277e+00-0.00000000e+00j
     3.39527837e+00-0.00000000e+00j]
   [ 2.63982896e+00-0.00000000e+00j  2.71318309e+00-0.00000000e+00j
     3.10068145e+00-0.00000000e+00j]
   ...
   [-3.95523620e+00-0.00000000e+00j -4.04929503e+00-0.00000000e+00j
    -4.04967137e+00-0.00000000e+00j]
   [ 6.83586401e-01-0.00000000e+00j  8.12941918e-01-0.00000000e+00j
     6.46036937e-01-0.00000000e+00j]
   [ 2.44325930e+00-0.00000000e+00j  2.74969043e+00-0.00000000e+00j
     2.45715743e+00-0.00000000e+00j]]

I would like to store the array , do some modifications like converitng some elements to zero for filtering out some elemnts and return the array /vector. Is it possible to do like that in C++?
How to declare the variable to store such values?

Source: Windows Questions C++

LEAVE A COMMENT