Thank you Bill for a very useful set of routines.
I have discovered a problem with writeSPIDERfile.m when it is used with Octave, an open-source matlab equivalent, so I thought I would share the fix. The problem is that the header length is computed wrong by the line:
labrec = uint32(1024 / lenbyt);
In Octave, at least, "uint32" seems to perform a rounding operation, whereas the correct operation is a "floor". So, the following fix appears to work just fine:
Thank you Bill for a very useful set of routines.
I have discovered a problem with writeSPIDERfile.m when it is used with Octave, an open-source matlab equivalent, so I thought I would share the fix. The problem is that the header length is computed wrong by the line:
labrec = uint32(1024 / lenbyt);
In Octave, at least, "uint32" seems to perform a rounding operation, whereas the correct operation is a "floor". So, the following fix appears to work just fine:
labrec = uint32(floor(1024 / lenbyt));