<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><font id="yui_3_16_0_ym18_1_1458673124339_4004" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4005" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4006" color="#228b22" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4007" dir="ltr"><font id="yui_3_16_0_ym18_1_1458673124339_4297" color="#000000" face="Helvetica" size="3">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"><font id="yui_3_16_0_ym18_1_1458673124339_4371" color="#000000" face="Helvetica" size="3">Thank you. </font></div><div dir="ltr"><font color="#000000" face="Helvetica" size="3">Srinivas</font></div><div dir="ltr"><font color="#000000" face="Helvetica" size="3"></font><br></div><div id="yui_3_16_0_ym18_1_1458673124339_4298">% http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4008"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4009">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4010">% 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"><font id="yui_3_16_0_ym18_1_1458673124339_4012" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4013">elec = [];</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4014">elec.pnt = randn(128,3);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4015">dum = sqrt(sum(elec.pnt.^2,2));</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4016"><font id="yui_3_16_0_ym18_1_1458673124339_4017" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4018" face="Courier New" size="2">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"><font id="yui_3_16_0_ym18_1_1458673124339_4020" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4021" color="#228b22" face="Courier New" size="2">% 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"><font id="yui_3_16_0_ym18_1_1458673124339_4023" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4024" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4025" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4026" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4027" color="#0000ff" face="Courier New" size="2"></font></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4028"><font id="yui_3_16_0_ym18_1_1458673124339_4029" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4030" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4031" color="#0000ff" face="Courier New" size="2">for</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4032" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4033" face="Courier New" size="2"> i=1:128</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4034" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4035" face="Courier New" size="2">
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4036"><font id="yui_3_16_0_ym18_1_1458673124339_4037" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4038" face="Courier New" size="2"> elec.label{i} = sprintf(</font></font><font id="yui_3_16_0_ym18_1_1458673124339_4039" color="#a020f0" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4040" color="#a020f0" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4041" color="#a020f0" face="Courier New" size="2">'%03d'</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4042" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4043" face="Courier New" size="2">, i);</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4044" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4045" face="Courier New" size="2">
</font></font><font id="yui_3_16_0_ym18_1_1458673124339_4046" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4047" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4048" color="#0000ff" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4049">end</div></font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4051" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4052" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4053" color="#228b22" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4054"><br></div>
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4059" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4060" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4061">vol = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4062"><font id="yui_3_16_0_ym18_1_1458673124339_4063" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4064" face="Courier New" size="2">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"><font id="yui_3_16_0_ym18_1_1458673124339_4066" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4067" color="#228b22" face="Courier New" size="2">% radii of spheres</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4068" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4069" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4070" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4071" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4072" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4073"><font id="yui_3_16_0_ym18_1_1458673124339_4074" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4075" face="Courier New" size="2">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"><font id="yui_3_16_0_ym18_1_1458673124339_4077" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4078" color="#228b22" face="Courier New" size="2">% conductivity</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4079" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4080" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4081" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4082" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4083" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4084"><font id="yui_3_16_0_ym18_1_1458673124339_4085" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4086" face="Courier New" size="2">vol.o = [0 0 0]; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4087" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4088" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4089" color="#228b22" face="Courier New" size="2">% center of sphere</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4090" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4091" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4092" color="#228b22" face="Courier New" size="2">
<div id="yui_3_16_0_ym18_1_1458673124339_4093"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4094">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4095">% 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"><font id="yui_3_16_0_ym18_1_1458673124339_4097" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4098">cfg = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4099"><font id="yui_3_16_0_ym18_1_1458673124339_4100" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4101" face="Courier New" size="2">cfg.vol = vol; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4102" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4103" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4104" color="#228b22" face="Courier New" size="2">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4105" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4106" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4107" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4108" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4109" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4110"><font id="yui_3_16_0_ym18_1_1458673124339_4111" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4112" face="Courier New" size="2">cfg.elec = elec; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4113" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4114" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4115" color="#228b22" face="Courier New" size="2">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4116" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4117" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4118" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4119" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4120" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4121">cfg.dip.pos = [0 0.5 0.3];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4122"><font id="yui_3_16_0_ym18_1_1458673124339_4123" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4124" face="Courier New" size="2">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"><font id="yui_3_16_0_ym18_1_1458673124339_4126" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4127" color="#228b22" face="Courier New" size="2">% 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"><font id="yui_3_16_0_ym18_1_1458673124339_4129" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4130" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4131" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4132" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4133">cfg.dip.frequency = 10;</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4134">cfg.ntrials = 1;</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4135"><font id="yui_3_16_0_ym18_1_1458673124339_4136" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4137" face="Courier New" size="2">cfg.triallength = 1; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4138" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4139" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4140" color="#228b22" face="Courier New" size="2">% seconds</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4141" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4142" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4143" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4144" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4145" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4146"><font id="yui_3_16_0_ym18_1_1458673124339_4147" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4148" face="Courier New" size="2">cfg.fsample = 250; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4149" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4150" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4151" color="#228b22" face="Courier New" size="2">% Hz</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4152" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4153" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4154" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4155" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4156" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4157">raw1 = ft_dipolesimulation(cfg);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4158">avg1 = ft_timelockanalysis([], raw1);</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4159"><font id="yui_3_16_0_ym18_1_1458673124339_4160" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4161" face="Courier New" size="2">plot(avg1.time, avg1.avg); </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4162" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4163" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4164" color="#228b22" face="Courier New" size="2">% plot the timecourse</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4165" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4166" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4167" color="#228b22" face="Courier New" size="2">
<div id="yui_3_16_0_ym18_1_1458673124339_4168"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4169"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4170">% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4171">% 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"><font id="yui_3_16_0_ym18_1_1458673124339_4173" face="Courier New" size="2"><div id="yui_3_16_0_ym18_1_1458673124339_4174">cfg = [];</div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4175"><font id="yui_3_16_0_ym18_1_1458673124339_4176" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4177" face="Courier New" size="2">cfg.vol = vol; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4178" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4179" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4180" color="#228b22" face="Courier New" size="2">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4181" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4182" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4183" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4184" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4185" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4186"><font id="yui_3_16_0_ym18_1_1458673124339_4187" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4188" face="Courier New" size="2">cfg.elec = elec; </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4189" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4190" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4191" color="#228b22" face="Courier New" size="2">% see above</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4192" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4193" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4194" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4195" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4196" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4197"><font id="yui_3_16_0_ym18_1_1458673124339_4198" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4199" face="Courier New" size="2">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"><font id="yui_3_16_0_ym18_1_1458673124339_4201" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4202" color="#228b22" face="Courier New" size="2">% initial search position</font></font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4203" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4204" color="#228b22" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4205" color="#228b22" face="Courier New" size="2">
</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4206" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4207" face="Courier New" size="2"></font></font><div id="yui_3_16_0_ym18_1_1458673124339_4208"><font id="yui_3_16_0_ym18_1_1458673124339_4209" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4210" face="Courier New" size="2">cfg.gridsearch = </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4211" color="#a020f0" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4212" color="#a020f0" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4213" color="#a020f0" face="Courier New" size="2">'no'</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4214" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4215" face="Courier New" size="2">;</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4216" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4217" face="Courier New" size="2">
<div id="yui_3_16_0_ym18_1_1458673124339_4218">dip1 = ft_dipolefitting(cfg, avg1);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4219"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4220"> [u,s,v] = svd(dip1.dip.mom);</div>
<div id="yui_3_16_0_ym18_1_1458673124339_4221"> </div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4222"><font id="yui_3_16_0_ym18_1_1458673124339_4223" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4224" face="Courier New" size="2"> </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4225" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4226" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4227" color="#0000ff" face="Courier New" size="2">if</font></font></font><font id="yui_3_16_0_ym18_1_1458673124339_4228" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4229" face="Courier New" size="2"> s(1,1) > s(2,2)</font></font></div><font id="yui_3_16_0_ym18_1_1458673124339_4230" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4231" face="Courier New" size="2">
<div id="yui_3_16_0_ym18_1_1458673124339_4232"> dipole_orientation = u(:,1); </div>
</font></font><div id="yui_3_16_0_ym18_1_1458673124339_4233" dir="ltr"><font id="yui_3_16_0_ym18_1_1458673124339_4234" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4235" face="Courier New" size="2"> </font></font><font id="yui_3_16_0_ym18_1_1458673124339_4236" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4237" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4238" color="#0000ff" face="Courier New" size="2">end</font></font></font></div><div id="yui_3_16_0_ym18_1_1458673124339_4307" dir="ltr"><font color="#0000ff" face="Courier New" size="2"></font><br></div><div dir="ltr"><font color="#0000ff" face="Courier New" size="2"></font><br></div><div id="yui_3_16_0_ym18_1_1458673124339_4308" dir="ltr"><font color="#0000ff" face="Courier New" size="2"></font><br></div><font id="yui_3_16_0_ym18_1_1458673124339_4239" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4240" color="#0000ff" face="Courier New" size="2"><font id="yui_3_16_0_ym18_1_1458673124339_4241" color="#0000ff" face="Courier New" size="2">
<div id="yui_3_16_0_ym18_1_1458673124339_4242"> </div>
<div id="yui_3_16_0_ym18_1_1458673124339_4243"> </div>
</font></font></font></div></body></html>