compute impedance from voltage and current measurements
No, that will give you the magnitude of the impedance. In order to get the full impedance you will also need to measure the phase shift between the voltage and current and combine that with the magnitude in order to get the phasor for the impedance.