<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>getAllocatedSparseMatrix</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">Bonjour,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">J’aimerais interfacer une fonction C avec scilab et lui passer une matrice creuse</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">Dans la fonction d’interface j’utilise : </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">iRet = getAllocatedSparseMatrix(pvApiCtx, piAddressVarThree, &iRows, &iCols, &iNbItem, &piNbItemRow, &piColPos, &pdblReal);</FONT></SPAN><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">les valeurs</FONT></SPAN><SPAN LANG="fr"> <FONT FACE="Calibri">iRows, iCols, iNbItem, piNbItemRow, piColPos</FONT></SPAN><SPAN LANG="fr"><FONT FACE="Calibri"> sont correctes</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">en revanche je n’arrive pas à accéder aux valeurs de</FONT></SPAN><SPAN LANG="fr"> <FONT FACE="Calibri">pdblReal</FONT></SPAN><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">cette variable est déclarée ainsi :</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">double* pdblReal = NULL;</FONT></SPAN><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">et après appel de</FONT></SPAN><SPAN LANG="fr"> <FONT FACE="Calibri">getAllocatedSparseMatrix</FONT></SPAN><SPAN LANG="fr"><FONT FACE="Calibri">,</FONT></SPAN><SPAN LANG="fr"><FONT FACE="Calibri"> je trouve que</FONT></SPAN><SPAN LANG="fr"> <FONT FACE="Calibri"> pdblReal[0 ou 1] =0</FONT></SPAN><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">y a-t-il un appel à une fonction spécifique à faire ?</FONT></SPAN><SPAN LANG="fr"><FONT FACE="Calibri"> fais-je une erreur de syntaxe ?</FONT></SPAN><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT FACE="Calibri">merci !</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#003980" FACE="Arial">Guylaine Collewet</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"> </SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009EE0" SIZE=2 FACE="Arial">Ingénieur de recherche</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009EE0" SIZE=2 FACE="Arial">Irstea</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"> </SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009EE0" SIZE=2 FACE="Arial">17, avenue de Cucillé</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009EE0" SIZE=2 FACE="Arial">CS 64427</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr-fr"><FONT COLOR="#009EE0" SIZE=2 FACE="Arial">35044 RENNES Cédex</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#003980" SIZE=2 FACE="Arial">02 23 48 21 67</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#003980" SIZE=2 FACE="Arial">02 23 48 21 15</FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><A HREF="http://www.irstea.fr/"><SPAN LANG="fr"></SPAN><SPAN LANG="fr"><U></U></SPAN><U><SPAN LANG="fr-fr"></SPAN></U><U><SPAN LANG="fr-fr"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">www.irstea.fr</FONT></SPAN></U><SPAN LANG="fr"></SPAN></A><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009DE0" SIZE=1 FACE="Calibri"> </FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"><FONT COLOR="#009DE0" SIZE=1 FACE="Calibri"> </FONT></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN><SPAN LANG="fr-fr"></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"></SPAN></P>
</BODY>
</HTML>