<div dir="ltr">Hi, <div><br></div><div>I am a little bit confused on how to appropriately do matrix addition with different nonzeros patterns. </div><div><br></div><div>Suppose I want to do D=2*A+3*B+4*C, A, B and C all have different nonzero patterns.</div><div>I know I can use MatDuplicate, MatCopy, MatConvert to create a matrix D, which way is the right way?</div><div><br></div><div>What's the difference between MatDuplicate and MatCopy?</div><div><br></div><div>Thank you very much!</div><div><br></div><div>Best regards,</div><div><br></div><div>Fangbo</div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font size="1" color="#9900ff">Fangbo Wang, PhD student</font></div><div><font size="1" color="#9900ff">Stochastic Geomechanics Research Group</font></div><div><span style="color:rgb(153,0,255);font-size:x-small">Department of Civil, Structural and Environmental Engineering</span></div><div><font size="1" color="#9900ff">University at Buffalo</font></div><div><font size="1" color="#9900ff">Email: <u><a href="mailto:fangbowa@buffalo.edu" target="_blank">fangbowa@buffalo.edu</a></u></font></div></div></div></div></div>
</div></div>