Monday 24 February 2014

MATLAB : Fast Fourier Transform

Fast Fourier Transform : MATLAB :

function y = FourierT(x, dt)
% FourierT(x,dt) computes forward FFT of x with sampling time interval dt
% FourierT approximates the Fourier transform where the integrand of the
% transform is x*exp(2*pi*i*f*t)
% For NDE applications the frequency components are normally in MHz,
% dt in microseconds
[nr, nc] = size(x);
if nr == 1
N = nc;
else
N = nr;
end
y = N*dt*ifft(x);


Sunday 23 February 2014

Windows command line commands : To copy files

Windows command line commands to copy files:


COPY :

Copy one or more files to another location .

Syntax
      COPY source destination [options]

      COPY source1 + source2.. destination [options]

Key
     source :  Pathname for the file or files to be copied.

        /A  :  ASCII text file (default)
        /B  :  Binary file copy - will copy extended characters.

destination :  Pathname for the new file(s).

        /V  :  Verify that the new files were written correctly.

        /N  :  If at all possible, use only a short filename (8.3) when creating a destination file. This may be necessary when copying between disks that are formatted differently e.g NTFS and VFAT, or when archiving data to an ISO9660 CDROM.

        /Z  :  Copy files in restartable mode. If the copy is interrupted part way through, it will restart if possible. 

Examples:

To copy file from source to destination 
COPY sourcefile.doc destinationfile.doc

To copy from a different folder/directory: 
COPY "C:\myfolder\sourcefile.doc" "D:\Newfolder\destinationfile.doc"

To copy all the files into the current directory specify the source only, with a wildcard:
COPY "C:\myfolder\*.doc"

To copy all the files to a different directory:
COPY "C:\myfolder\*.txt" "D:\Newfolder\destfiles.txt" 

To have no feedback on screen while copying , specify the following command :
COPY sourcefile.doc destinationfile.doc >nul