


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
==============================================================

0001 function [] = create_data(data_type, filename) 0002 % CREATE_DATA: Off-line creation of 1-D data 0003 % 0004 % 0005 % GENERAL 0006 % 0007 % [] = create_data(data_type, filename) 0008 % 0009 % INPUT/S 0010 % 0011 % -data_type: 0012 % The type of data to be created. 0013 % 0014 % -filename: 0015 % The name of the file for data to be exported into. 0016 % 0017 % OUTPUT/S 0018 % 0019 % -None, but a data file is created 0020 % 0021 % PENDING WORK 0022 % 0023 % - 0024 % 0025 % KNOWN BUG/S 0026 % 0027 % - 0028 % 0029 % COMMENT/S 0030 % 0031 % - 0032 % 0033 % RELATED FUNCTION/S 0034 % 0035 % 0036 % 0037 % ABOUT 0038 % 0039 % -Created: April 5th, 2004 0040 % -Last update: April 5th, 2004 0041 % -Revision: 0.0.1 0042 % -Author: R. S. Schestowitz, University of Manchester 0043 % ============================================================== 0044 0045 0046 if (strcmp(data_type, 'flat')), 0047 points1=[-1:0.04:0.96]; 0048 images1=[0.100:0.01:0.590]; 0049 0050 for i=1:10, 0051 images(:,i)=images1(1,:)' 0052 end 0053 0054 for i=1:10, 0055 points(:,i)=points1(1,:)' 0056 end 0057 elseif (strcmp(data_type, 'plain')), 0058 points1=[-1:0.04:0.96]; 0059 images1=repmat([0.5], 1, 50); 0060 0061 for i=1:10, 0062 images(:,i)=images1(1,:)'; 0063 end 0064 0065 for i=1:10, 0066 points(:,i)=points1(1,:)'; 0067 end 0068 elseif (strcmp(data_type, 'plain randomised height')), 0069 points1=[-1:0.04:0.96]; 0070 images1=repmat([0.5], 1, 50); 0071 0072 for i=1:10, 0073 images(:,i)=images1(1,:)' + ((rand - 0.5) / 2) 0074 end 0075 0076 for i=1:10, 0077 points(:,i)=points1(1,:)'; 0078 end 0079 else 0080 error('Unknown data type.'); 0081 end 0082 0083 save([[filename],['.mat']], 'images','points');