<div dir="ltr">Hi <div>This is my code</div><div><div class="gmail-rtcContent" style="padding:30px"><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg = [];</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.dataset     = <span style="color:rgb(167,9,245)">'C:\Users\hp\Documents\MATLAB\subject_1\MEG_data\4'</span>;</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">data_meg        = ft_preprocessing(cfg,MEG_data);</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(14,0,255)">for </span>trialsel=1:10</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  chansel = 1; <span style="color:rgb(0,128,19)">% this is the STIM channel that contains the trigger</span></span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  figure</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  plot(data_meg.time{trialsel}, data_meg.trial{trialsel}(chansel, :))</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  xlabel(<span style="color:rgb(167,9,245)">'time (s)'</span>)</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  ylabel(<span style="color:rgb(167,9,245)">'channel amplitude (a.u.)'</span>)</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">  title(sprintf(<span style="color:rgb(167,9,245)">'trial %d'</span>, trialsel));</span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(14,0,255)">end</span></span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(14,0,255)"><br></span></span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(14,0,255)">And I am getting the following error please someone help me out.</span></span></div><div class="gmail-lineNode" style="font-size:10pt;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">Error using ft_read_header<br>unsupported header format "unknown"<br><br>Error in ft_preprocessing (line 404)<br>  hdr = ft_read_header(cfg.headerfile, headeropt{:});<span style="white-space:pre"><span style="color:rgb(14,0,255)"><br></span></span></div></div></div></div>