<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Paul,<br>
<br>
How about manually editing your file to standardize the spacing
between the numbers?<br>
<br>
For instance, using your editor's "Find and Replace" tool to
replace two spaces " " with one space " " until you get only one
space between each number?<br>
<br>
Hope this helps,<br>
Have a good day,<br>
Paul.<br>
<br>
<br>
On 10/21/2013 02:29 PM, Carrico, Paul wrote:<br>
</div>
<blockquote
cite="mid:55A12CBC06A8C9459DCE0BBEF8122FDC0BA9B10C@exchsrv.auxitrol.ad"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Monospaced;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Pr\00E9format\00E9 HTML Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.PrformatHTMLCar
{mso-style-name:"Pr\00E9format\00E9 HTML Car";
mso-style-priority:99;
mso-style-link:"Pr\00E9format\00E9 HTML";
font-family:"Courier New";
mso-fareast-language:FR;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2025788256;
mso-list-type:hybrid;
mso-list-template-ids:1483516758 726043434 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
{mso-level-start-at:16;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear All<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How can I convert a
matrix of characters into integers when the separator has
different number of spaces ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The spaces come probably
from a printf format such as : printf(“%10d\n”,var)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<pre><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";mso-fareast-language:EN-US" lang="EN-US">I ‘m currently using <b><u>csvTextScan</u></b> and I’ve some troubles/errors with <b><u>csvRead</u></b> …<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span lang="EN-US">Example</span></u><span
lang="EN-US"> :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">! 300006 12799
24678 17504 21558 212801 24680 17508
21560 !<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">NB:<o:p></o:p></span></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
lang="EN-US"><span style="mso-list:Ignore">-<span
style="font:7.0pt "Times New Roman"">
</span></span></span><!--[endif]--><span lang="EN-US">I
read first an ascii file<o:p></o:p></span></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
lang="EN-US"><span style="mso-list:Ignore">-<span
style="font:7.0pt "Times New Roman"">
</span></span></span><!--[endif]--><span lang="EN-US">I
removed some specific lines directly in the matrix<o:p></o:p></span></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
lang="EN-US"><span style="mso-list:Ignore">-<span
style="font:7.0pt "Times New Roman"">
</span></span></span><!--[endif]--><span lang="EN-US">Then
I’m trying to convert the matrix of characters into a matrix
of intergers<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for any
suggestion<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Paul<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#########################################<o:p></o:p></span></p>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">PATH_FILE</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:#32B9B9">get_absolute_file_path</span><span style="color:#4A55DB">(</span><span style="color:rosybrown">"lecture.sce"</span><span style="color:#4A55DB">)</span><span style="color:black">;</span> <o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">FILE_NAME</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:rosybrown">'topology_elem.rad'</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"><o:p> </o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#32B9B9" lang="EN-US">stacksize</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">(</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:rosybrown" lang="EN-US">'max'</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">)</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">;</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">M</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:#32B9B9">mopen</span><span style="color:#4A55DB">(</span><span style="color:black">PATH_FILE</span> <span style="color:#5C5C5C">+</span> <span style="color:rosybrown">"/"</span> <span style="color:#5C5C5C">+</span> <span style="color:black">FILE_NAME,</span><span style="color:rosybrown">'r'</span><span style="color:#4A55DB">)</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">record</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:#32B9B9">mgetl</span><span style="color:#4A55DB">(</span><span style="color:black">M</span><span style="color:#4A55DB">)</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">[</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">nl,nc</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">]</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:#32B9B9">size</span><span style="color:#4A55DB">(</span><span style="color:black">record</span><span style="color:#4A55DB">)</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"><o:p> </o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">nbre_elem</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:#4A55DB">(</span><span style="color:black">nl</span> <span style="color:#5C5C5C">/</span> <span style="color:rosybrown">3</span><span style="color:#4A55DB">)</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">Nodes_char</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">(</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:rosybrown" lang="EN-US">1</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#FFAA00" lang="EN-US">:</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">nbre_elem</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">)</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"> <span style="color:#5C5C5C">=</span> <span style="color:black">record</span><span style="color:#4A55DB">(</span><span style="color:rosybrown">1</span><span sty
le="color:#FFAA00">:</span><span style="color:rosybrown">3</span><span style="color:#FFAA00">:</span><span style="color:black">nl</span><span style="color:#4A55DB">)</span><span style="color:black">;</span><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"><o:p> </o:p></span></pre>
<pre><i><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#64AE64">// convert</span></i><span style="font-size:14.0pt;font-family:"Monospaced","serif""><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black">Nodes</span><span style="font-size:14.0pt;font-family:"Monospaced","serif""> <span style="color:#5C5C5C">=</span> <span style="color:#32B9B9">csvTextScan</span><span style="color:#4A55DB">(</span><span style="color:black">Nodes_char,</span><span style="color:rosybrown">" "</span><span style="color:#4A55DB">)</span><span style="color:black">; </span><i><span style="color:#64AE64">// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span></i><o:p></o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif""><o:p> </o:p></span></pre>
<pre><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#32B9B9" lang="EN-US">mclose</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">(</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:black" lang="EN-US">M</span><span style="font-size:14.0pt;font-family:"Monospaced","serif";color:#4A55DB" lang="EN-US">)</span><span style="font-size:14.0pt;font-family:"Monospaced","serif"" lang="EN-US"><o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<pre>--------------------------------------------------------------------------------
Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Paul BIGNIER
Scilab Engineer & Xcos Developer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
<a class="moz-txt-link-freetext" href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a></pre>
</body>
</html>