<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">
      <div class="moz-cite-prefix">Le 29/07/2018 à 13:56, Samuel Gougeon
        a écrit :<br>
      </div>
      <blockquote
        cite="mid:348f4809-20ea-e83e-a804-37f66409f65f@free.fr"
        type="cite">Hello Lester, <br>
        <br>
        Le 29/07/2018 à 13:18, arctica1963 a écrit : <br>
        <blockquote type="cite">Hello all,
          <br>
          <br>
          I need to increase the dimensions over which the FFT is
          calculated to avoid
          <br>
          edge effects,
          <br>
        </blockquote>
        <br>
        AFAIK, padding the initial signal does not avoid edge effects (i
        guess one deal with edges discontinuity). <br>
        It can even be the source of discontinuity, and so yield fake
        high fft amplitudes at high frequencies. <br>
        It will be the case if  the original signal S has no edge
        discontinuity ( S(1)~S($)) but you padd <br>
        it with zeros while its edge does not fall to zeros (=>
        |S($)|>>0, S($+1)==0). Even worse, <br>
        in this case, windowing the signal will no longer be effective,
        since the padding will move <br>
        the discontinuity in the body of the padded signal instead of on
        signal's edge. <br>
        <br>
        Padding a signal increases the lowest frequency of its numerical
        FT, that is the sampling frequency <br>
        of its FFT. AFAIUnderstand, there is no edge matter there. <br>
        <br>
        But this is more a signal processing topic than a Scilab one. <br>
      </blockquote>
      <br>
      Le 29/07/2018 à 13:18, arctica1963 a écrit :<br>
    </div>
    <blockquote cite="mid:1532863098914-0.post@n3.nabble.com"
      type="cite">
      <pre wrap="">Hello all,

I need to increase the dimensions over which the FFT is calculated to avoid
edge effects, and following the suggestion of Samuel Gougeon back in 2016,
this was recommended:

Scilab: 6.0.1

data = [1 2 3; 4 5 6; 7 8 9]
addedRows = 3; addedCols = 3;

tmp = [data ; data($, :) .*. ones(addedRows, 1)]; // add rows to bottom
tmp = [tmp  tmp(:, $) .*. ones(1,addedCols)]; // add columns to right
tmp = [repmat(tmp(1, : ), addedRows, 1) ; tmp]; // add rows to top
paddedMat = [repmat(tmp(:,1) , 1, addedCols) tmp] // add columns to left</pre>
    </blockquote>
    <br>
    <font size="-1"><tt>--> paddedMat = [repmat(tmp(:,1) , 1,
        addedCols) tmp] // add columns to left</tt><tt><br>
      </tt><tt> paddedMat  = </tt><tt><br>
      </tt><tt><br>
      </tt><tt>   1.   1.   1.   1.   2.   3.   3.   3.   3.</tt><tt><br>
      </tt><tt>   1.   1.   1.   1.   2.   3.   3.   3.   3.</tt><tt><br>
      </tt><tt>   1.   1.   1.   1.   2.   3.   3.   3.   3.</tt><tt><br>
      </tt><tt>   1.   1.   1.   1.   2.   3.   3.   3.   3.</tt><tt><br>
      </tt><tt>   4.   4.   4.   4.   5.   6.   6.   6.   6.</tt><tt><br>
      </tt><tt>   7.   7.   7.   7.   8.   9.   9.   9.   9.</tt><tt><br>
      </tt><tt>   7.   7.   7.   7.   8.   9.   9.   9.   9.</tt><tt><br>
      </tt><tt>   7.   7.   7.   7.   8.   9.   9.   9.   9.</tt><tt><br>
      </tt><tt>   7.   7.   7.   7.   8.   9.   9.   9.   9.</tt></font><tt><br>
    </tt><br>
    OK: here the padding is not done with zeros. Sorry for my
    misunderstanding.<br>
    <br>
  </body>
</html>