function [] = create_data(data_type, filename)
% CREATE_DATA: Off-line creation of 1-D data
%
%
%    GENERAL
%
%      [] = create_data(data_type, filename)
%
%    INPUT/S
%
%      -data_type:
%           The type of data to be created.
%
%      -filename:
%           The name of the file for data to be exported into.
%           
%    OUTPUT/S
%
%      -None, but a data file is created 
%
%    PENDING WORK
%
%      -
%
%    KNOWN BUG/S
%
%      -
%
%    COMMENT/S
%
%      -
%
%    RELATED FUNCTION/S
%
%      
%
%    ABOUT
%
%      -Created:     April 5th, 2004
%      -Last update: April 5th, 2004
%      -Revision:    0.0.1
%      -Author:      R. S. Schestowitz, University of Manchester
% ==============================================================


if (strcmp(data_type, 'flat')),       
	points1=[-1:0.04:0.96];
	images1=[0.100:0.01:0.590];
	
	for i=1:10,
      images(:,i)=images1(1,:)'
	end
	
	for i=1:10,
      points(:,i)=points1(1,:)'
	end
elseif (strcmp(data_type, 'plain')),
    points1=[-1:0.04:0.96];
	images1=repmat([0.5], 1, 50);
	
	for i=1:10,
      images(:,i)=images1(1,:)';
	end
	
	for i=1:10,
      points(:,i)=points1(1,:)';
	end
elseif (strcmp(data_type, 'plain randomised height')),
    points1=[-1:0.04:0.96];
	images1=repmat([0.5], 1, 50);
	
	for i=1:10,
      images(:,i)=images1(1,:)' + ((rand - 0.5) / 2)
	end
	
	for i=1:10,
      points(:,i)=points1(1,:)';
	end
else
    error('Unknown data type.');
end

save([[filename],['.mat']], 'images','points');
