$PrePrint = # /. {Power[z, n_] -> DisplayForm[SuperscriptBox[z, n]]} &;
Example usage: Linear model of the 2nd order delta-sigma modulator in z^-n form
$PrePrint = # /. {Power[z, n_] -> DisplayForm[SuperscriptBox[z, n]]} &;
% This calculates the SNR of a bandpass delta-sigma modulator
% Alper Ucar, ucar {at} ieee {dot} org
% -------------------------------------------------------
% [snrv,PxtdB,PxnbdB] = snr(data,tone,fftlen,osr,offset)
% data: output stream in time-domain
% tone: input stream in time-domain
% fftlen: FFT length
% osr: oversampling ratio
% offset: number of samples to be removed from both sides
% of the spectral content for the measurement
% PxtdB: input power
% PxnbdB: noise power
% snrv: SNR
function[snrv,PxtdB,PxnbdB] = snr(data,tone,fftlen,osr,offset)