• Dirty Data Done Dirt Cheap

    I have to confess to feeling a bit stupid. I have been struggling with MATLAB for weeks now, trying to get it to read in my data files so I can automate my analyses. My data is in a tab-delimited file and looks something like:

    Doc1	Doc2	Doc3	Doc4
    Doc1	100	76	18	91
    Doc2	76	100	22	35
    Doc3	18	22	100	65
    Doc4	91	34	65	100
    

    This is not too dissimilar from the labelled diagram, part of the MATLAB documentation on data importing. Except that, if you look at the table below it, which describes which functions to use, they don’t have a function with a similar example to their labelled diagram. Early on I thought I should be able to use dlmread, which allows you specify rows/columns for starting points or a range. My idea was just to have a range which excluded the non-numeric troublesome labels. No matter what I did, though, I could not get it to work. It was frustrating, because I could paste the data into the Import Wizard and that could handle the data fine. I wrote people, I researched on the web, and I tried all sorts of things.

    Eventually, I came full-circle back to dlmread and experimented by making a small data file with unrelated data in it. That worked fine. So I then copied half of one of my data tables into the test file and tried that. That also worked fine. I copied the whole data table into the test file and used dlmread on it. It worked fine! What was the difference between the two identical data files other than their filenames? When I uncovered the answer to that, I kicked myself. My data files were generated years ago and stored on my Mac OS 9-based laptop. My laptop and the data have since migrated to Apple’s swoopy BSD-based UNIX goodness and that’s the environment that MATLAB runs under. So… Have you guessed the problem? Yes, it was linefeeds! The data files had original Mac linefeeds and MATLAB wanted UNIX linefeeds. D’oh! It just goes to reaffirm that the things you don’t see can really hurt you.

    Read the rest of this entry »

     
  • Love the License

    By the end of April, I seemed to be stymied in my quest for an affordable copy of MATLAB that I could run on my local laptop. The university maintains a license pool for the base software plus toolkits. I do have access to run a copy from the license server when I’m on campus. It actually worked off of campus too, when I’d been told it shouldn’t, but that turned out to be a mistake. When I reported it, the firewall was closed to the outside world for requests for the license server. That’s where honesty gets you: no MATLAB accessibility from anywhere with an Internet connection.
    I was hoping to snag one of the concurrent licenses for my permanent use and offered even to buy an additional one for that purpose as that would be cheaper. I was told that I couldn’t have one and I should investigate the student version of the software. Unfortunately, the student version is only available to students in taught courses, not Ph.D. research students, so that wasn’t any good. I mentioned to Thufir that I’d been turned down, reportedly by the head of software/hardware procurement within our department. Thufir promised to see what he could do. Then, last week, I received an e-mail last week from the lab manager, the person in charge of the procurement. He offered, if somebody would pay for it, to install an academic version of the software on my university-owned equipment for only £525 (~930 US/780 €). That was just for the base software and not also for the toolkit I need.

    Read the rest of this entry »

     
  • MATLAB & MDS

    I need some help in using MATLAB and MDS, so I looked to Google to find resources. There seem to be more MDS resources than when I last looked quite some time ago. I found a useful page with links and pointers to MDS-related resources at http://www.granular.com/MDS/. From there, I obtained most of the resources for a pyschology course organized around MDS taught by one of the MDS’s primary researchers Forrest Young. I downloaded all the notes in PDF format and stored them away to browse through. Young is the same researcher responsible for developing the ViSta software (Visual Statistics System), which looks a lot like that Canadian object-oriented, icon-based programming language. I remember looking at ViSta before, but I don’t think it supported doing things like MDS and it hasn’t been recently updated for anything other than Windows.

    Read the rest of this entry »

     
  • Dimensional MATLAB Reading

    Played around a little more with MATAB, although I didn’t really get very far. I was trying to figure out how to use dlmread to import my data files properly into MATLAB automatically. It didn’t really seem to want to fly somehow.
    I spent some time trying to figure out how to automate my MATLAB work. I couldn’t figure out how to get it to import the tab-delimited data files that my programs had produced using the dlmread command which should put it into a matrix. I can do it via the clipboard but not anyway else at the moment. Reviewing various MATLAB tutorials on the web, looking for hints, I realized that I need to review my understanding and knowledge of matrices again, so I’ve added this to my list of things to be done.
    Assuming that my methodology is correct, which it might not be, I can now map one MDS cluttering onto another using the Procrustes in MATLAB. I need to figure out now how to get a single measure of how different the two are from that. I’m at least further along than before, so that’s promising.

    Read the rest of this entry »

     
-->