title: denosing signal using soft and hard thresholding
body: <p>let us consider following code</p>
  
  <pre><code>&gt;&gt; fs=100;
  &gt;&gt; N=1000;
  &gt;&gt; t=0:1/fs:N-1;
  &gt;&gt; y=10*sin(2*pi*100*t)+0.5*randn(size(t));
  &gt;&gt; plot(y)
  &gt;&gt; plot(t,y)
  &gt;&gt; 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/qzlpG.png" alt="enter image description here"></p>
  
  <p>i  have applied  following  threshold  methods
  thr = 0.4;</p>
  
  <p>% Perform hard thresholding. 
  ythard = wthresh(y,'h',thr);</p>
  
  <p><img src="https://i.stack.imgur.com/18LE0.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/2jyNc.png" alt="enter image description here"></p>
  
  <p>but i can't see any difference,also soft threshold method,codes are there</p>
  
  <pre><code>ythard = wthresh(y,'h',thr);
  &gt;&gt; plot(ythard)
  &gt;&gt; ytsoft = wthresh(y,'s',thr);
  &gt;&gt; plot(ytsoft)
  </code></pre>
  
  <p>so what is wrong?also i have done thresholding time time domain without calculation wavelet coefficients,are they equal to each other?i meant if i will generate wavelet coefficients and threshold this coefficient,will they give me same result?thanks in advance</p>