function [k_space, t] = encodingMRI (pd, t1, t2, tr, te, excit)
% =========================================================================
% [k_space, t] = encodingMRI (pd, t1, t2, tr, te, excit)
% 
% The function calculates the Fourier transform or the MRI image, provided
% the different parameters
% 
% PARAMETRY:
% * pd - Spin density
% * t1 - Spin-Lattice relaxation constant
% * t2 - Spin-Spin relaxation constant
% * tr - Repetition time
% * te - Reading time
% * excit - Number of excitations
% 
% VYSTUP:
% * k_space - Fourier transform of the MR image measured
% * t - time
% 
% Example:
%     load('fantom.mat');
%     tr = 5000; te = 1;
%     [k_space, t] = encodingMRI (pd, t1, t2, tr, te, 4);
%     figure; imagesc( log(abs(k_space)) ); colormap gray;
% 
% -------------------------------------------------------------------------

if nargin<5,  error('too few parameters');  end;
