<div dir="ltr"><div>Hi there,</div><div><br></div><div>Following instructions <span class="m_7105314051761703732gmail-gr_ m_7105314051761703732gmail-gr_68 m_7105314051761703732gmail-gr-alert m_7105314051761703732gmail-gr_spell m_7105314051761703732gmail-gr_inline_cards m_7105314051761703732gmail-gr_run_anim m_7105314051761703732gmail-ContextualSpelling m_7105314051761703732gmail-ins-del m_7105314051761703732gmail-multiReplace" id="m_7105314051761703732gmail-68">posted </span>earlier by Carsten Wolters,  Johannes Vorwerk, Marios Antonakakis and others on this list, I have managed to get my way to the calc_stiff_matrix_val function call. Verifying on my way sanity of every step and results. <br></div><div><br></div><div>For <span class="m_7105314051761703732gmail-gr_ m_7105314051761703732gmail-gr_973 m_7105314051761703732gmail-gr-alert m_7105314051761703732gmail-gr_spell m_7105314051761703732gmail-gr_inline_cards m_7105314051761703732gmail-gr_run_anim m_7105314051761703732gmail-ContextualSpelling m_7105314051761703732gmail-ins-del m_7105314051761703732gmail-multiReplace" id="m_7105314051761703732gmail-973">th</span>e sake of curiosity, I have tried to input the regular conductivity values (num_nodes × 1) and the tensor conductivity values for "xx yy zz xy yz zx“ (num_nodes × 6) as suggested by Johannes, but I have cheated a bit, and I have used the same conductivity value for every direction (COND = repmat( cond, [1,6] ).</div><div><br></div><div>Now, I haven't expected to get the very same results (identical) for the two inputs, but two very similar matrices would be a sane thing to expect (disregarding noise related to floating point rounding and multiplication by some scaling factor, as I haven't normalized the COND magnitude and only "repmatted" it). The resulting stiffness matrices are highly correlated but not as high as I have expected (the correlation is about 0.9434. However, I have expected something closer to 0.9999). <br></div><div><br></div><div>Can anybody explain what is happening here or point me to math/papers that can provide any insight?<br></div><div><br></div><div>Below is the code snippet. Thank you in advance for any help or suggestions...<br></div><div><br></div><div><br></div><div>[diinsy,cols,sysmat] = calc_stiff_matrix_val(node,elem,cond,mele);</div><div>npnt = double(npnt);<br>diinsy = double(diinsy);<br>cols = double(cols);<br>rows = sb_sparse_to_mat(diinsy);<br>stiff = sparse(rows,cols,sysmat,npnt,npnt,length(sysmat));</div><div><br></div><div>COND = repmat( cond, [1,6] );</div><div>[diinsy,cols,sysmat] = calc_stiff_matrix_val(node,elem,COND,mele);</div><div>npnt = double(npnt);<br>diinsy = double(diinsy);<br>cols = double(cols);<br>rows = sb_sparse_to_mat(diinsy);<br>STIFF = sparse(rows,cols,sysmat,npnt,npnt,length(sysmat));<br></div><div><br></div><div><the values are returned to the variables below></div><div><br></div><div>spar_04 = sphe_simbio_vol_headmodel_04_final.stiff(1:20000,1:20000);<br>spar_05 = sphe_simbio_vol_headmodel_05_isotr.STIFF(1:20000,1:20000);<br><br>full_04 = full(spar_04);<br>full_05 = full(spar_05);<br><br>coeff = corrcoef(full_04(:),full_05(:));<br>coeff<br></div><div><br></div><div><br></div><div>Best</div><div>Eben<br></div><div><br></div><div><br></div><div><br></div><div> <br></div></div>