Use two 1D lookup tables where the inputs of 1st and 2nd lookup tables is average power and the output of one lookup table is amplitude and that of other lookup table is phase of the signal.
Doc Link:
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!