The extra copy of Matlab is located (found in a drawer) and I now have it on my machine. I go ahead and verify whether the synchronized data actually are. It takes more than ten minutes. More like thirty because of endian issues. The data were in big endian format but were being read in as little endian.
In big endian, the most significant bytethe big endof the two byte number comes first; in little endian it's the opposite. "Most significant" means the highest order. For example, in the number 10, the '1' is the most significant digit; it comes first as we read it.
As a result of the data being read incorrectly, my first graphs look like noise, not a nice sine wave, and I spend a fair amount of time trying to figure out (1) what endian are my data, (2) what endian is Matlab reading (the opposite of what I had, obviously), and (3) how to tell Matlab to read in the data appropriately. The solution? Use the fopen() function to indicate the endian being used by Matlab and then force Matlab to read big endian:
my_file_id=fopen("my_file_name", 'r', 'b'); %r: read only, b: big endian
Now my graphs have nice swoopy sine waves and, sure enough, the data are synchronized. Even better, the Hamsters are sampling identical input values within hundredths of a volt of each other. Wanting to show off, I take the graphs to Dr. Smith's office. He's not there, so I leave a page on his desk. With no titles on the graphs, but he can figure it out.
Eventually he turns up in my lab and we discuss the data. Unsurprisingly, now that I have data analysis capabilities in place, he has more suggestions for types of data to gather and ways to analyze them. He seems to think that I managed to teach myself the graphical programming language well enough to do all these graphs at the same time that I was resolving (most of) the intractable synchronization problems, making up parts lists, identifying features to add to the next generation of Hamsters, verifying that said features won't interfere with Hamster data collection, and learning enough TCP/IP and Hamster C to accomplish the above.
I set him straight. "No, if I were doing this with the graphical language, it would be three weeks before I could get to this point."
"That's a student for you, just get that answer," he says.
Well, yeah. "I'll work on the graphical language when I get a chance." Like I'll get a chance.
428 words | June 24, 2004 08:48 PM | Rocket science