- So firstly you need to convert complex double to double, so you need to decide whether you want the real part, the imaginary part or the absolute value of the compelx number and based on that you can use real, imag or abs functions respectively.
- Then you need to scale this array so that the values are in the range of [0,1] by subtracting the minimum value and dividing by the total range.
- Once you have that you can use the uint8 function to convert the array to uint8 type.
- After that you can generate image using the image function.
- Let I be the array of complex double type
- Convert I to double type : I=real(I) or I=imag(I) or I=abs(I)
- Scale the converted array : I = (I - min(I,[],"all")) / (max(I,[],"all") - min(I,[],"all"));
- Convert to unit8 type : U8 = uint8(round(I));
- Generate image : image(U8)