How to reconstruct RF signal using IQ data I have a complex IQ signal: $s =  X  + Yi$. I know my original $f_0$ was $5\textrm{ MHz}$.

I can calculate the magnitude/amplitude of $s$: $A = \sqrt{X^2 + Y^2}$
and phase, $\phi = \arctan\left(\frac YX\right) $

But how can I reconstruct the signal using this frequency, amplitude and phase data?

I need the output as a time varying signal which incorporates the amplitude and phase information from the IQ data. I have found this:


  The reconstruction of RF-data from IQ-data is straightforward. It is a
  reversal of the complex demodulation  in  the  previous  section.  The
  decimation  is  reversed  by  interpolation.  The  low- pass  filter 
  cannot  be  reversed,  but  should  be  chosen  without  loss  of 
  information  in  the  first place.  The  down  mixing  is  reversed 
  by  up  mixing.  At  last,  the  RF-signal  is  found  by  taking the
  real-value of the complex up-mixed signal.


But I could really do with a worked example.

EDIT:

This MATLAB code appears to do what I want:

IQ = resample(IQ,downsampl,1); 

[Z,X] = size(IQ); 
time = [0:Z-1]'*1/F * ones(1,X); 

signal = IQ .* exp(+2*pi*i*time*carrier); 

signal = real(signal); 


where resample resamples IQ at downsampl/1 times.

It is not clear to me what I should use for downsampl and what F is?
The RF signal $r(t)$ is obtained from the complex baseband (IQ) signal $s(t)=x(t)+jy(t)$ in the following way:

$$r(t)=\text{Re}\{s(t)e^{j\omega_0t}\}\tag{1}$$

where $\omega_0$ is the carrier frequency (in rad/s). There are two other equivalent representations of $(1)$, where I use $s(t)=x(t)+jy(t)=a(t)e^{j\phi(t)}$:

$$\begin{align}r(t)&amp;=x(t)\cos(\omega_0t)-y(t)\sin(\omega_0t)\tag{2}\\
r(t)&amp;=a(t)\cos(\omega_0t+\phi(t))\tag{3}\end{align}$$

Eq. $(2)$ shows that the I- and Q-components are both modulated by orthogonal carriers, whereas $(3)$ shows that $r(t)$ generally exhibits amplitude modulation as well as phase modulation.

The quote in your question suggests that in the respective text the signals are all represented as discrete-time signals, hence the decimation and interpolation stages.