<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi all,<br>I would like to convert a Fieldtrip raw data structure to a .fif file, so
 I can do further analysis using Neuromag software. I am trying to use 
the fieldtrip2fiff function as in the example, but it is not working:<br><br>cfg = [];<br>cfg.dataset     = 'test.fif';<br>data        = ft_preprocessing(cfg)<br><br>fieldtrip2fiff('new_test.fif',data)<br><font color="#ff0000"><br><font color="#330000">This is the error I am getting:</font><br><br>??? Error using ==> fiff_start_file at 35<br>Permission denied<br><br>Error in ==> fiff_start_writing_raw at 54<br>fid = fiff_start_file(name);<br><br>Error in ==> fieldtrip2fiff at 124<br>  [outfid, cals] = fiff_start_writing_raw(fifffile, info);</font><br><br>I checked this problem in the discussion list and it seems to be unsolved.I downloaded the newest version of Fieldtrip and I checked the writing permissions of my OS (the function [fid, message]=fopen('new_test.fif','w+','ieee-be') works fine).<br>Maybe you are using another code or you have modified this function. Thank you for your time.<br>Best,<br>Mikel<br><br>-- <br><div><span name="x"></span>Mikel Lizarazu<br>Predoctoral researcher<br>www.bcbl.eu<br><br>Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer<span name="x"></span><br></div></div></body></html>