mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2003-11-26, 14:54   #1
tom11784
 
tom11784's Avatar
 
Aug 2003
Upstate NY, USA

2·163 Posts
Default small matlab program for results file

Attached below is a small MATLAB file that takes your current results file given as the first arguement, and outputs a much more simplified (and shorter) file containing only info on the data.

Basically it gets rid of the timestamp lines and the lines containing only your user data.


This .m file runs in MATLAB (with MATLAB pointing to the directory containing this script and the results file) as:
result_smaller(current_results_filename,new_results_filename);


Also, at the end of the file it will display the number of exponents tested, and the number that produced a factor under that test.


There are a few things before you use this though....
If you modify the format of the results file at all beforehand, make sure that there are no lines with less than ## characters in the file you run this .m script on as it causes a crash on either line 29 or 33.
## denotes the number used in line 33 of the program when you read on.


Also, in line 29 of the program there is a check if the 14th character is '/'. This position needs to be updated depending on your username.
It equals 6+(size_of_username).
My username is tom11784 (8 chars), giving the 14 in the orginal code.

In line 33 there is a check if the 31st character is 'h'. This also needs to be updated to your computer info to give the number of factors.
It equals 19+(size_of_username)+(size_of_computername)
My computername is work (4 chars), with the 8 for my username gives the 31 in the original .m file.


I hope this is helpful to people. Let me know if you see anything wrong, have any comments, suggestions, etc.
Attached Files
File Type: zip result_smaller.zip (714 Bytes, 293 views)

Last fiddled with by tom11784 on 2003-11-26 at 14:56
tom11784 is offline   Reply With Quote
Old 2003-11-26, 19:24   #2
Complex33
 
Complex33's Avatar
 
Aug 2002
Texas

5×31 Posts
Default

Hey good to hear someone else using MatLAB out there. I also wrote a little m-file that extracts all the major information from the summary.txt files that I collect on an hourly basis. Opens the thousand or so summary files out of a directory and then puts the info in vector form and can save a comma delimited file graph stuff, etc. Ah the beauty of MatLAB.
Complex33 is offline   Reply With Quote
Old 2003-11-29, 14:30   #3
tom11784
 
tom11784's Avatar
 
Aug 2003
Upstate NY, USA

2·163 Posts
Default

Quote:
Originally posted by Complex33
Hey good to hear someone else using MatLAB out there. I also wrote a little m-file that extracts all the major information from the summary.txt files that I collect on an hourly basis. Opens the thousand or so summary files out of a directory and then puts the info in vector form and can save a comma delimited file graph stuff, etc. Ah the beauty of MatLAB.
Where I work if you want purely mathematical calculations you use MATLAB as apposed to Maple 9, or any other such mathematical program. However, you more like would want a finite element analysis where I work, but that's a whole other issue. They also like to point out what happens in both Maple and MATAB when you try to take the inverse of:
[ 1 2 3 ]
[ 4 5 6 ]
[ 7 8 9 ]

My main use is to take 65536x2 data charts and produce more usable charts (like 10000x2) for further analysis, and to make plots of the more usable charts. Many a day I spend running those .m files
tom11784 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bu file intermediate results zabig Information & Answers 3 2013-01-16 00:42
Command-line program for factoring small numbers James Heinrich Software 22 2011-08-29 16:35
A small factoring program Yamato Factoring 2 2007-11-21 23:29
Small win32 program, range of time to do a TF dsouza123 Programming 1 2003-10-09 16:04
Small win32 program to show system uptime and more dsouza123 Programming 0 2003-09-28 22:28

All times are UTC. The time now is 23:18.


Fri Aug 6 23:18:24 UTC 2021 up 14 days, 17:47, 1 user, load averages: 3.48, 3.96, 4.01

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.