Hi, I am trying to convert some Matlab code where structured data variables
were used that were composed of complex and real data which is passed to
a function. The original Matlab call was [poles, L2] =
PSO("FLBF",lb,ub,poles,data) and data is of the form data.Y and data.w,
where Y is a complex number and w the frequency.
In Julia I have defined the following structure
type Data_array
Y::Float64
w::Float64
end
but am not clear on how to get Y to be a complex Float64? I tried
Complex(Float64), and Array(Float64,1041) versions as well as combinations
of im but these were all rejected.
If I comment out the non compliant lines of code so it will run, I see
that Y is of size (1041,1) and w is of size (1, 1041). Trying to form the
data variable using
data = Data_array(Y, w)
suffers a conversion error.
Can someone advise on how to make the needed structured variable?