Dear Erin,
Try
D = spm_eeg_load;
ft_write_data('myfile', D(:,:,:), 'header',
ft_read_header(fullfile(D.path, D.fname)), 'dataformat',
'brainvision_eeg');
Vladimir
On Thu, May 3, 2012 at 8:45 AM, Hawkins, Erin (2011)
<[log in to unmask]> wrote:
> Dear Vladimir,
>
> Many thanks for your previous help with this. We were wondering if it would
> be possible to clarify what the input for the function should be to write
> the .vhdr file? Using the command ft_write_data('G:\EEG Data
> (D-Drive)\GrandMean.mat', [82, 801, 1], 'dataformat', 'matlab') an error in
> ft_write_data is returned at line 351 ([path, file, ext] =
> fileparts(filename);). So the data structure may not be specified in the
> correct way, and I suppose the command may also need a specification to
> write a .vhdr file from this data input? If you could offer any advice here
> we would again be very grateful.
>
> Best,
> Erin
> ________________________________
> From: Duncan Astle [[log in to unmask]]
> Sent: 24 April 2012 19:02
> To: Vladimir Litvak
> Cc: Hawkins, Erin (2011)
> Subject: RE: header files
>
> Thanks Vladimir,
>
>
>
> We’ll give that a whirl and let you know how we get on.
>
>
>
> Best,
>
> Duncan
>
>
>
> ________________________________________________
>
> Dr. Duncan Astle,
>
> Programme Leader Track,
>
> British Academy Research Fellow,
>
> MRC Cognition and Brain Sciences Unit,
>
> Chaucer Road,
>
> Cambridge.
>
> [log in to unmask]
>
>
>
> From: Vladimir Litvak [mailto:[log in to unmask]]
> Sent: 24 April 2012 18:56
> To: Duncan Astle
> Cc: Hawkins, Erin (2011); [log in to unmask]
> Subject: Re: header files
>
>
>
> Dear Duncan,
>
>
>
> See the function ft_write_data (included with SPM). You can apply the
> functions ft_read_header and ft_read_data to your SPM mat file to get the
> inputs for this function. Note that things like condition labels cannot be
> transferred this way.
>
>
>
> Best,
>
>
>
> Vladimir
>
>
>
>
>
> On 24 Apr 2012, at 17:44, Duncan Astle wrote:
>
>
>
> Hi Vladimir,
>
>
>
> We were wondering if you knew how to make a header file (.vhdr) for an SPM
> EEG file? We have the .dat file/s, and want to take them into a
> topographical analysis software package, but it won’t do it without a header
> file.
>
>
>
> Any advice you could offer would be very gratefully received.
>
>
>
> Best,
>
> Duncan
>
> ________________________________________________
>
> Dr. Duncan Astle,
>
> Programme Leader Track,
>
> British Academy Research Fellow,
>
> MRC Cognition and Brain Sciences Unit,
>
> Chaucer Road,
>
> Cambridge.
>
> [log in to unmask]
>
>
>
>
|