This code can do this
%Voiceprint raise lower freq phase conjugate signal
tic
clear all, clc,clf,tic
%% Sound /beep calculation complete
filerawbeepStr='calculations_complete.wav';
filerawbeeppathStr='/home/rat/Documents/octave/raw/';
filevoiceprepathStr='/home/rat/Documents/octave/eq_research/main/transform/voice/';
filewavpathStr='/home/rat/Documents/octave/eq_research/main/transform/wav/';
[ybeep, Fsbeep, nbitsbeep] = wavread(strcat(filerawbeeppathStr,filerawbeepStr));
%addpath(”/home/rat/Documents/octave/eq_research/main/transform/”); %add path to location of functions
%1a voice print import
[vp_sig_orig, fs_rate, nbitsraw] = wavread(strcat(filevoiceprepathStr,'voice8000fs.wav'));
%vp_sig_orig=vp_sig_orig’;
vp_sig_len=length(vp_sig_orig);
%2a create frequency domain
ya_fft = fft(vp_sig_orig);
vp_sig_phase_orig = unwrap(angle(ya_fft));
%get Magnitude
ya_fft_mag = abs(ya_fft);
%3a frequency back to time domain
ya_ifft=real(ifft(ya_fft));
%Back to Time domain
vp_sig_new=real(ifft(ya_fft_mag.*exp(i*vp_sig_phase_orig)));
subplot(3,1,1), plot(vp_sig_orig),title('1 original time domain')
subplot(3,1,2), plot(ya_ifft),title('2 rebuild time domain')
subplot(3,1,3), plot(vp_sig_new),title('3 adjusted time')
This is what the IFFT is for. Do your modifications to the spectrum, and then get them back into the form IFFT expects, and then do an IFFT. Don't bother trying to re-implement the IFFT when you don't have to. It will be slower and more error-prone.
So each point in an FFT is a complex number that contains information about the phase and amplitude at that frequency. You're extracting this information with these lines:
sigphase = unwrap(angle(sigfft')); %get phase of orginal signal
mx = abs(fftx)/length(vp_sig_orig);
You're getting the magnitude and phase of each complex number, converting from rectangular complex number to polar form.
After modifying the phases and magnitudes, to reverse them back into something suitable for the IFFT, you just need to undo these and convert each back into a rectangular complex number, using the formula:
$z = r(\cos \varphi + i\sin \varphi ).\, $
where z is the resulting complex number, r is the magnitude, and φ is the phase. You'll have to undo the scaling of the magnitudes (and undo any change from radians to degrees, etc.) You'd do this for each mag, phase pair in the two vectors, combining them back into a single vector of the original length, made up of complex numbers. Then feed this to the IFFT. If you hadn't made any changes, it should return the original signal.
Best Answer
The Nyquist frequency is simply half the sampling frequency of a sampled signal. Since you didn't specify any sampling frequency, and you used $t$ as the time variable, which usually refers to continuous time, there is no way to answer your question. In general you don't need Matlab or the FFT, you just need to know (or choose) the sampling frequency, and you'll know the Nyquist rate right away.