<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear Srinivas Kota,<div class=""><br class=""></div><div class="">So what you did here is simulate a dipole which changes its moment over time (refer to help ft_dipolesimulation)</div><div class=""><br class=""></div><div class="">So the resulting dipole position it computed is something like [5.2523e-08 0.5000 0.3000]. However if you look at dip1.dip.mom you see it as [3x250 double] matrix. The first entry is the [1 0 0] which you were looking for and all the the other describe the moment at a different timepoint. If you have a quick look at plot(dip1.dip.mom(1,:)) you see the oscillation of the dipole.</div><div class=""><div class=""><br class=""></div></div></div><div class="">Bests,</div><div class=""><div class=""><div class="" style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><div dir="ltr" class=""><br class=""></div></div></div></div><div class=""><div class="">
Simon Homölle<br class="">PhD Candidate<br class="">Donders Institute for Brain, Cognition and Behaviour<br class="">Centre for Cognitive Neuroimaging<br class="">Radboud University Nijmegen<br class="">Phone: +31-(0)24-36-65059
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 22 Mar 2016, at 20:09, Srinivas Kota <<a href="mailto:svkotak@yahoo.com" class="">svkotak@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4004" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4005" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4006" color="#228b22" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4007" dir="ltr" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4297" face="Helvetica" size="3" class="">I am working on simulated data example provided in the fieldtrip toolbox webpage. When I find the dipole moment after dipole fitting is [-1 0 0], where as original dipole mom was [1 0 0]. I was not sure if I am calculated dipole moment correctly. Any help would be appreciated.</font></div><div id="yui_3_16_0_ym18_1_1458673124339_4357" dir="ltr" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4371" face="Helvetica" size="3" class="">Thank you. </font></div><div dir="ltr" class=""><font face="Helvetica" size="3" class="">Srinivas</font></div><div dir="ltr" class=""><font face="Helvetica" size="3" class=""></font><br class=""></div><div id="yui_3_16_0_ym18_1_1458673124339_4298" class="">% <a href="http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit" class="">http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit</a></div>
<div id="yui_3_16_0_ym18_1_1458673124339_4008" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4009" class="">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4010" class="">% create a set of electrodes, randomly placed on the sphere</div>
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4011" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4012" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4013" class="">elec = [];</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4014" class="">elec.pnt = randn(128,3);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4015" class="">dum = sqrt(sum(elec.pnt.^2,2));</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4016" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4017" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4018" face="Courier New" size="2" class="">elec.pnt = elec.pnt ./ [dum dum dum];  </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4019" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4020" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4021" color="#228b22" face="Courier New" size="2" class="">% scale them to a unit sphere</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4022" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4023" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4024" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4025" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4026" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4027" color="#0000ff" face="Courier New" size="2" class=""></font></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4028" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4029" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4030" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4031" color="#0000ff" face="Courier New" size="2" class="">for</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4032" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4033" face="Courier New" size="2" class=""> i=1:128</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4034" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4035" face="Courier New" size="2" class="">
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4036" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4037" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4038" face="Courier New" size="2" class="">   elec.label{i} = sprintf(</font></font><font id="yui_3_16_0_ym18_1_1458673124339_4039" color="#a020f0" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4040" color="#a020f0" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4041" color="#a020f0" face="Courier New" size="2" class="">'%03d'</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4042" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4043" face="Courier New" size="2" class="">, i);</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4044" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4045" face="Courier New" size="2" class="">
</font></font><font id="yui_3_16_0_ym18_1_1458673124339_4046" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4047" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4048" color="#0000ff" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4049" class="">end</div></font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4051" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4052" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4053" color="#228b22" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4054" class=""><br class=""></div>
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4059" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4060" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4061" class="">vol = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4062" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4063" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4064" face="Courier New" size="2" class="">vol.r = [0.88 0.92 1.00]; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4065" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4066" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4067" color="#228b22" face="Courier New" size="2" class="">% radii of spheres</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4068" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4069" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4070" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4071" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4072" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4073" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4074" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4075" face="Courier New" size="2" class="">vol.cond = [1 1/80 1];       </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4076" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4077" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4078" color="#228b22" face="Courier New" size="2" class="">% conductivity</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4079" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4080" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4081" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4082" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4083" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4084" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4085" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4086" face="Courier New" size="2" class="">vol.o = [0 0 0];          </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4087" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4088" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4089" color="#228b22" face="Courier New" size="2" class="">% center of sphere</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4090" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4091" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4092" color="#228b22" face="Courier New" size="2" class="">
<div id="yui_3_16_0_ym18_1_1458673124339_4093" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4094" class="">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4095" class="">% create a dipole simulation with one dipole and a 10Hz sine wave</div>
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4096" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4097" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4098" class="">cfg      = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4099" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4100" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4101" face="Courier New" size="2" class="">cfg.vol  = vol;             </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4102" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4103" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4104" color="#228b22" face="Courier New" size="2" class="">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4105" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4106" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4107" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4108" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4109" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4110" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4111" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4112" face="Courier New" size="2" class="">cfg.elec = elec;            </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4113" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4114" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4115" color="#228b22" face="Courier New" size="2" class="">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4116" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4117" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4118" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4119" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4120" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4121" class="">cfg.dip.pos = [0 0.5 0.3];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4122" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4123" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4124" face="Courier New" size="2" class="">cfg.dip.mom = [1 0 0]';     </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4125" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4126" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4127" color="#228b22" face="Courier New" size="2" class="">% note, it should be transposed</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4128" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4129" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4130" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4131" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4132" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4133" class="">cfg.dip.frequency = 10;</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4134" class="">cfg.ntrials = 1;</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4135" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4136" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4137" face="Courier New" size="2" class="">cfg.triallength = 1;        </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4138" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4139" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4140" color="#228b22" face="Courier New" size="2" class="">% seconds</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4141" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4142" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4143" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4144" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4145" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4146" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4147" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4148" face="Courier New" size="2" class="">cfg.fsample = 250;          </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4149" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4150" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4151" color="#228b22" face="Courier New" size="2" class="">% Hz</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4152" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4153" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4154" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4155" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4156" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4157" class="">raw1 = ft_dipolesimulation(cfg);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4158" class="">avg1 = ft_timelockanalysis([], raw1);</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4159" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4160" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4161" face="Courier New" size="2" class="">plot(avg1.time, avg1.avg);  </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4162" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4163" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4164" color="#228b22" face="Courier New" size="2" class="">% plot the timecourse</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4165" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4166" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4167" color="#228b22" face="Courier New" size="2" class="">
<div id="yui_3_16_0_ym18_1_1458673124339_4168" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4169" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4170" class="">% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4171" class="">% do a dipole fit of the first simulated dataset</div>
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4172" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4173" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4174" class="">cfg      = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4175" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4176" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4177" face="Courier New" size="2" class="">cfg.vol  = vol;         </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4178" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4179" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4180" color="#228b22" face="Courier New" size="2" class="">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4181" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4182" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4183" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4184" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4185" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4186" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4187" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4188" face="Courier New" size="2" class="">cfg.elec = elec;        </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4189" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4190" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4191" color="#228b22" face="Courier New" size="2" class="">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4192" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4193" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4194" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4195" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4196" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4197" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4198" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4199" face="Courier New" size="2" class="">cfg.dip.pos = [0 0 0];  </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4200" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4201" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4202" color="#228b22" face="Courier New" size="2" class="">% initial search position</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4203" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4204" color="#228b22" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4205" color="#228b22" face="Courier New" size="2" class="">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4206" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4207" face="Courier New" size="2" class=""></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4208" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4209" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4210" face="Courier New" size="2" class="">cfg.gridsearch = </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4211" color="#a020f0" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4212" color="#a020f0" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4213" color="#a020f0" face="Courier New" size="2" class="">'no'</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4214" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4215" face="Courier New" size="2" class="">;</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4216" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4217" face="Courier New" size="2" class="">
<div id="yui_3_16_0_ym18_1_1458673124339_4218" class="">dip1 = ft_dipolefitting(cfg, avg1);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4219" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4220" class="">[u,s,v] = svd(dip1.dip.mom);</div></font></font></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="" style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><font id="yui_3_16_0_ym18_1_1458673124339_4216" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4221" class=""></div></font><div id="yui_3_16_0_ym18_1_1458673124339_4222" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4223" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4224" face="Courier New" size="2" class=""></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4225" color="#0000ff" face="Courier New" size="2" class="">if</font><font id="yui_3_16_0_ym18_1_1458673124339_4228" face="Courier New" size="2" class=""> s(1,1) > s(2,2)</font></div><font id="yui_3_16_0_ym18_1_1458673124339_4230" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4231" face="Courier New" size="2" class=""><div id="yui_3_16_0_ym18_1_1458673124339_4232" class="">dipole_orientation = u(:,1); </div></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4233" dir="ltr" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4234" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4235" face="Courier New" size="2" class=""></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4236" color="#0000ff" face="Courier New" size="2" class="">end</font></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div dir="ltr" class=""><font color="#0000ff" face="Courier New" size="2" class=""></font><br class=""></div><div id="yui_3_16_0_ym18_1_1458673124339_4308" dir="ltr" class=""><font color="#0000ff" face="Courier New" size="2" class=""></font><br class=""></div><font id="yui_3_16_0_ym18_1_1458673124339_4239" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4240" color="#0000ff" face="Courier New" size="2" class=""><font id="yui_3_16_0_ym18_1_1458673124339_4241" color="#0000ff" face="Courier New" size="2" class="">
<div id="yui_3_16_0_ym18_1_1458673124339_4242" class=""> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4243" class=""> </div>
</font></font></font></div></div>_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div></blockquote></div><br class=""></div></body></html>