Warning: Rank deficient, rank = 0... means what?

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?

4 Commenti

Rick
Rick il 25 Set 2012
Modificato: Rick il 25 Set 2012
These warnings were also shown when i tried to wavwrite:
Warning: Data clipped during write to file:Scrambled.wav
> In wavwrite>PCM_Quantize at 279
In wavwrite>write_wavedat at 301
In wavwrite at 138
In Speech_Scrambler at 29
What does it mean?
Rick
Rick il 26 Set 2012
Modificato: Rick il 26 Set 2012
I used:
x(:,frame) = pinv(y\H, 0);
to solve my problem.
By doing this, I am keeping the same values for those values which are less than 0. But I am not sure whether is it the correct way. Any suggestion would be appreciated.
John D'Errico
John D'Errico il 10 Dic 2024
Modificato: John D'Errico il 10 Dic 2024
Please don't post new questions as an answer to an old question. Ask your question separately.
As far as how to solve it, you need to post sufficient code to know why it is happening. We cannot see inside your computer. If it is annoying, it is the result of a mistake you made in some way, so annoyance should not be a factor. Write better code. Or post enough code that someone can help you.
I did not mean any disrespect by "annoying", and it was my first post, so I ask a little bit of patience. Sorry to have asked. Won't happen again.

Accedi per commentare.

 Risposta accettata

Wayne King
Wayne King il 25 Set 2012
Modificato: Wayne King il 25 Set 2012
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.

6 Commenti

Rick
Rick il 25 Set 2012
Modificato: Rick il 25 Set 2012
I see, So this warning: "Warning: Rank deficient, rank = 0, tol = 0.000000e+00." can be ignored? As you said its subjective.
I have tried to use:
scram_sig = scram_sig / (max(abs(scram_sig)));
to scale the scrambled signal to within the range. But it still does clipping when i write it.
Edit:
I have just tried this:
scram_sig = scram_sig./max(abs(scram_sig(:)))*(1-(2^-(8-1)));
It does not give me the warning anymore. But I am still getting alot of noise. Is there any way where I can mask off the and make the speech clearer?
I said surjective, not subjective.
Oh, meaning that for every x, that might be more than 1 y?
what does rank deficient matrix affects?
surjective means that for Ax=b there is at least one solution for every b.
Rick
Rick il 25 Set 2012
Modificato: Rick il 25 Set 2012
i see, than what does rank deficient matrix affects?
Isn't a surjective solution valid though? I guess bijections are the "best" but is there a reason a surjective solution gets that warning? Any relation to group theory would help my brain understand the problem.

Accedi per commentare.

Più risposte (1)

Walter Roberson
Walter Roberson il 25 Set 2012
I can't tell what your "H" is there, but your "y" is all zero (or close to it) for 16 consecutive samples at some point.
The "clipped" indicates that you are attempting to write samples outside the range -1 to +1.

1 Commento

Rick
Rick il 25 Set 2012
Modificato: Rick il 25 Set 2012
H is a hadamard matrix of order 16.
Because i scrambled the signal using frame of 16 samples using:
y(:,k) = H*x;
k = k + 1;
I am now trying to descrambled it using 16 samples too by doing:
ori_sig(:,k) = y\H;
k = k + 1;
I know that clipping introduces distortion. Is there anyway where i can change the range of "y" to –1.0 <= y < +1.0, because I'm using 8 bits.

Accedi per commentare.

Categorie

Scopri di più su Audio I/O and Waveform Generation in Centro assistenza e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by