<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>to add on, it might not just affect csvRead, but also others file IO functions as well:<br></div><div><br></div><div>how to reproduce:<br></div><div><br></div><div>// Not OK</div><div>a = ones(1,300000); <br></div><div>b = strcat(string(a));<br></div><div>mputl(b,'test.txt');<br></div><div>c = mgetl('test.txt');<br></div><div><br></div><div><br></div><div>then a is 250,000 mgetl get the string correctly, but when a is 300,000, it return empty string.<br></div><div><br></div><div>on the other hand, file in single column of data working fine. <br></div><div><br></div><div>// OK</div><div>a = ones(1,300000); <br></div><div>b = string(a);<br></div><div>mputl(b,'test.txt');<br></div><div>c = mgetl('test.txt');<br></div><div><br></div><div>thanks.<br></div><div><br></div><div>rgds,<br>CL</div><br><div data-zbluepencil-ignore="true" style="" class="zmail_extra"><br><div id="Zm-_Id_-Sgn1">---- On Wed, 12 Feb 2020 23:40:45 +0800 <b>arctica1963 <arctica1963@gmail.com></b> wrote ----<br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;"><div>PI250KDP.TXT <<a target="_blank" href="http://mailinglists.scilab.org/file/t495709/PI250KDP.TXT">http://mailinglists.scilab.org/file/t495709/PI250KDP.TXT</a>> <br>PI500KDP.TXT <<a target="_blank" href="http://mailinglists.scilab.org/file/t495709/PI500KDP.TXT">http://mailinglists.scilab.org/file/t495709/PI500KDP.TXT</a>> <br> <br>clear <br>// path to the txt file <br>path = 'PI250KDP.txt' <br>// read the file as string <br>piAsString = csvRead(path, [],[],'string') <br>// split the string at '' (use no token) <br>[piAsString] = strsplit(piAsString,''); <br>// convert string to double <br>piDigits = strtod(piAsString); <br>// search: how often appears a certain value in a specific range within the <br>digits <br>searchRange = 10000; <br>searchVal = 1; <br>// adapt the range, to search only places behind the decimal sign <br>[locations] = find(piDigits(1:searchRange+1) == searchVal); // small tweak <br>here <br>printf("The number %d appears %d times in the first %d digits of <br>Pi\n",searchVal,length(locations),searchRange) ; <br>printf("The number %d appears at following locations: \n", searchVal); <br>disp(locations'); <br> <br>The 250K file works; the 500k file fails <br> <br> <br> <br>-- <br>Sent from: <a target="_blank" href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a> <br>_______________________________________________ <br>users mailing list <br><a target="_blank" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> <br><a target="_blank" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a> <br></div></blockquote></div><div><br></div></div><br></body></html>