I am having trouble getting your program to run on Windows7 with MatLab 7.9.1 (R2009b).
I downloaded dcraw for windows 7 and placed it in the folder I use for MatLab. It is saved as dcraw64.exe. I then change all "dcrawx86" to "dcraw64".
Can you please let me know if I'm doing something obviously wrong? If possible, could you give me an example of how you call your openRawImage command? v=openRawImage('data') ?