ccc_readMDF


Custom Channel Configuration Function: ccc_readMDF


Description:

This function reads mdf files (format V3.x and V4.x), typically

generated by INCA, CANape or CANoe and provides the data in a structure

format, by converting the mdf file into a temporary mat file.


NOTE: THE MAPPING OF THE TIME CHANNELS, AS WELL AS THE CHANNEL META DATA

      CAN BE FOUND IN THE "masterChannelList"!

 

NOTE: IF A .mat FILE WITH THE SAME NAME IS IN THE FILE FOLDER, THE .mat

      FILE WILL BE LOADED INSTEAD OF THE .mdf FILE, UNLESS THE 'overwrite'

      PARAMETER IS SPECIFIED!


Syntax:  [data, channels] = ccc_readMDF(filename, 'showChannels', 'appendTime')


Inputs:

   filename  [char]       absolute filename to the mdf file


   Optional input parameters:

   'showChannels'         a list dialog with all available channels will be displayed

   'appendTime'           append the master channel name (time) to the channel name

                          >> DATACHANNELNAME_TIMECHANNELNAME

   'canapeFormat'         output the data in the same format like the CANape mat 

                          converter, which means:

                              1. append time channel to channelname ('appendTime')

                              2. change time channel format from e.g. t_23 to t23

   'matOverwrite'         overwrites mat files in the same file folder

   'matKeep'              keep the mat file after converting the mdf file


Outputs:

   data      [1x1 struct] data struct containing all channels from the mdf file

   channels  [Nx1 cell]   cell array of strings containing all channels

                          names of the data struct