Figured out my problem for real this time by digging around in the
code (kudos for FIL's open source approach!). It turns out that the
reason "HDR edit" was not working is that I had some folders in the
pathname with spaces in their names. The function "spm_hwrite.m"
explicitly discards spaces in the pathname (held in variable "P"),
presumably because it does not expect names to have meaningful spaces
in them (they are not allowed in UNIX names but are allowed in NT
names). When it gets to the fopen command, the missing spaces cause
the attempt to open the file to fail, making fid (the file id number)
equal -1. Unfortunately, for some reason I am not clear on, instead
of continuing on to the next line where the fid value of -1 would
cause an error message to be issued, matlab simply aborts the
function, causing the user to be mystified.
Bottomline - until FIL issues a bugfix, just don't use folder or file
names with spaces in them.
Cheers!
Joe
----------------------------------------------------------------------
----------
Joseph Dien
Assistant Professor of Psychology
Department of Psychology
2007 Percival Stern Hall
Tulane University
New Orleans, LA 70118-5698
Office: Room 3061
Phone: (504) 862-3300
Fax: (504) 862-8744
E-mail:[log in to unmask]
www: http://www.tulane.edu/~jdien/Dien.html
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|