MATLAB: Warning: Rank deficient, rank = 0… means what

reconstruct speech

Hi,
I am using the original signal FS and nbits. When i played the sound, it does have the speech, but its very noisy. I am currently doing this:
wavwrite(sig, Fs, nbits, 'Scrambled.wav');
i = 1;
k = 1;
siz = wavread('Scrambled.wav', 'size');
tot_samples = siz(1);
while(i<=tot_samples-15)
y = wavread('Scrambled.wav',[i i+15]);
ori_sig(:,k) = y\H;
if i == 1;
disp('Descrambling Speech in Progress...');
end
i = i+16;
k = k+1;
end
recon_sig = reshape(ori_sig,size(ori_sig,1)*size(ori_sig,2),1);
sound(recon_sig);
I have this warning: "Warning: Rank deficient, rank = 0, tol = 0.000000e+00."
What does it mean?

Best Answer

The inverse of a NxN matrix only exists only if the matrix has rank N. In other words, the linear operator that the matrix represents is surjective.
Computing the inverse in a computer has numerical subtleties. That warning is telling you that the matrix is rank deficient.
The wavwrite warning indicates that your signal values exceed +/- 1 and are being clipped when the .wav file is written. I don't think you want that clipping, that distorts the signal. You can scale the vector in MATLAB to make sure that the values do not exceed +/- 1 for writing.