%
% DESCRIPTION: Program to create the Atmospheric Pressure GDF file in the Matlab format.
% 
% [TimeZone] and [Description] have text format so the values give in ''


clear;clc;
[FormatName] = 'GDF';
[FormatVersion] = 2.1;
[CRS] = 'n/a'%['EPSG:' num2str(input('[CRS] EPSG code (just number) = '))];
[TimeZone] = 'UTC';%input('TimeZone (char) = ');
[Description] = 'Description of the dataset' %input('Description of data (char) = ');
         
[FieldDescription] = {
    'Date','Time of measurement'
    'Atmospheric_pressure','Atmospheric pressure'
    'Air_temperature','Air temperature'
    };
[FieldType] = {
    'Date',5
    'Atmospheric_pressure',24
    'Air_temperature',122
    };
[FieldUnit] = {
    'Date','datenum'
    'Atmospheric_pressure','24'
    'Air_temperature','122'
    };
[d] = struct();

d.Date = [736310.489583333
736310.500000000
736310.510416667];

d.Atmospheric_pressure = [10.1850
10.1485
10.1570];

d.Air_temperature = [4.5570
4.3700
4.8830];

save('GDF_EpisodeName_Atmospheric_pressure_example.mat')