<div class="gmail_quote">On Sat, Oct 1, 2011 at 00:39, behzad baghapour <span dir="ltr">&lt;<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>I just be able to get right answer from MatGetArray( A, &amp;a ) only if I define matrix in Dense fromat.</div>
<div> </div>
<div>How could I get the right Answer from this function when I define SparseAIJ matrix?</div></blockquote></div><br><div>Depends what you mean by &quot;right answer&quot;. This function accesses private storage, so it&#39;s different for each matrix format. You might want to look at MatView() or MatConvert().</div>