<!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>Hi,<br></div><div><br></div><div>tabul function might help.<br></div><div><br></div><div>sample data download from <a href="https://thestarman.pcministry.com/math/pi/picalcs.htm" target="_blank">https://thestarman.pcministry.com/math/pi/picalcs.htm</a><br></div><div><br></div><div>unzip the <b style="color: rgb(0, 0, 0); font-family: Arial; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a href="https://thestarman.pcministry.com/math/pi/df/pimultdp.zip" target="_blank">PimultDP.Zip</a></b><br></div><div><br></div><div>following lines do the "counting" job. <br></div><div><br></div><div>have not tried the millions decimal places, good luck. <img ref="image" src="cid:0.28869226610.3750887092282532425.170388a3725__smiley__img__src" data-attr="smiley" title="Smile" style="vertical-align: middle; width: 24px; height: 24px;"><br></div><div><br></div><div><br></div><div>--> data = mgetl('PI25K_DP.TXT'); <br></div><div><br></div><div>--> data2=strsplit(data);<br></div><div><br></div><div>--> tabul(data2)<br></div><div>ans =<br></div><div><br></div><div><br></div><div> ans(1)<br></div><div><br></div><div>!9 !<br></div><div>! !<br></div><div>!8 !<br></div><div>! !<br></div><div>!7 !<br></div><div>! !<br></div><div>!6 !<br></div><div>! !<br></div><div>!5 !<br></div><div>! !<br></div><div>!4 !<br></div><div>! !<br></div><div>!3 !<br></div><div>! !<br></div><div>!2 !<br></div><div>! !<br></div><div>!1 !<br></div><div>! !<br></div><div>!0 !<br></div><div><br></div><div><br></div><div> ans(2)<br></div><div><br></div><div> 2509.<br></div><div> 2465.<br></div><div> 2480.<br></div><div> 2541.<br></div><div> 2567.<br></div><div> 2549.<br></div><div> 2491.<br></div><div> 2403.<br></div><div> 2519.<br></div><div> 2476.<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div data-zbluepencil-ignore="true" style="" class="zmail_extra"><div><br></div><div id="Zm-_Id_-Sgn1">---- On Wed, 12 Feb 2020 15:57:23 +0800 <b>arctica1963 <arctica1963@gmail.com></b> wrote ----<br></div><div><br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;"><div>Hello Philipp <br> <br>Your suggestion is kind of what I am trying to do, but the text file is not <br>a CSV structure. It is just a single, very big number on one row. A small <br>chunk: <br> <br>31415926535897932384626433832795028841971693993751058209749445923078164 etc <br>(no spaces between digits) <br> <br>How best to load the text file and then count the number of occurrences of a <br>specific digit (e.g. 1)? At the moment the file essentially contains a very <br>big integer. <br> <br>Interested to see the best method of doing this. <br> <br>Thanks <br> <br> <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>