<div class="gmail_quote">On Sat, Oct 1, 2011 at 00:39, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@gmail.com</a>></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, &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 "right answer". This function accesses private storage, so it's different for each matrix format. You might want to look at MatView() or MatConvert().</div>