Design Filter with Arbitrary Magnitude and Phase Response in Matlab
for FIR, the simplest way is to inverse FFT you two-sided complex frequency response:

$$ h[n] = \operatorname{iFFT} \left\{ H[k] \right\} $$

(use a Kaiser window to window the FIR to a length that is acceptable to implement.)

i presume you have access to firpm( ) and/or firls( ).

so first divide your complex frequency response into real and imaginary parts:

$$ H_r[k] = |H[k]| \cos\left(\arg\{H[k]\} \right) $$
$$ H_i[k] = |H[k]| \sin\left(\arg\{H[k]\} \right) $$

send both $H_r[k]$ and $H_i[k]$ to the Parks-McClellan or Least Squares optimal FIR designer, but set ftype to 'hilbert' for $H_i[k]$.

sum the two resulting real-valued FIRs to get your result.

lastly, if you want to design an IIR to an arbitrary magnitude and phase spec, then that's a much bigger problem and consideration.  maybe use Prony to design to your impulse response $h[n]$ or use Matt's dissertation that i first learned of now, or use Greg Berchin's FDLS.  i dunno.  no quick solution for you there.