I have a .dat file similar to the following:
* ID=Minilog-T
* Serial Number=1328
* Study ID=Rostherne 2008
* Start Time=13-11-2008,14:23:14
* Finish Time=09-12-2009,13:01:53
* Sample Period=02:00:00
* Number of Deployments=9
* Date(dd-mm-yyyy),Time(hh:mm:ss),Celsius (°C)
13-11-2008,14:23:14,20.6
13-11-2008,16:23:14,15.3
I would like to insert the data into a cell array where I have:
dat = {'13-11-2008','14:23:14','20.6';'13-11-2008','16:23:14','15.3'};
dat =
'13-11-2008' '14:23:14' '20.6'
'13-11-2008' '16:23:14' '15.3'
I have tried:
fid = fopen(...);
dat = textscan(fid,'%s%s%s','headerlines',8);
However, this imports everything into 3 separate cell arrays i.e. it does not take the same format as a matrix. How can I solve this?