Hi,
tabul function might help.
sample data download from https://thestarman.pcministry.com/math/pi/picalcs.htm
unzip the https://thestarman.pcministry.com/math/pi/df/pimultdp.zip
following lines do the "counting" job.
have not tried the millions decimal places, good luck.
--> data = mgetl('PI25K_DP.TXT');
--> data2=strsplit(data);
--> tabul(data2)
ans =
ans(1)
!9 !
! !
!8 !
! !
!7 !
! !
!6 !
! !
!5 !
! !
!4 !
! !
!3 !
! !
!2 !
! !
!1 !
! !
!0 !
ans(2)
2509.
2465.
2480.
2541.
2567.
2549.
2491.
2403.
2519.
2476.
---- On Wed, 12 Feb 2020 15:57:23 +0800 arctica1963 <[email protected]>
wrote ----
Hello Philipp
Your suggestion is kind of what I am trying to do, but the text file is not
a CSV structure. It is just a single, very big number on one row. A small
chunk:
31415926535897932384626433832795028841971693993751058209749445923078164 etc
(no spaces between digits)
How best to load the text file and then count the number of occurrences of a
specific digit (e.g. 1)? At the moment the file essentially contains a very
big integer.
Interested to see the best method of doing this.
Thanks
--
Sent from:
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
mailto:[email protected]
http://lists.scilab.org/mailman/listinfo/users_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users