Could not construct original matrix using SVD I need to


read a .wav file
make a 2D matrix from it using the STFT
generate its singular value decomposition
do some watermarking


but I can't build the original matrix again via matrix multiplication:

 x = audioread('0.wav');
 stft = spectrogram(x); 
 [U,S,V] = svd(stft);
 stftb=U*S*V.';


The problem is that STFT and STFTb are not the same.
Don't have enough reputation to comment but you need to use the conjugate transpose in your formula for the result to be correct. So try stftb=U*S*V'; in the last line of code. Note that I removed the . which makes a difference since the matrices you are working with are complex.