Dear Fabian,
writeCTFds is not used by SPM. It's part of the CTF library that we
distribute and partially use but do not officially support. The
situation is further complicated by the fact that the version of the
library that you have in Tuebingen is likely not the same as what we
are about to include in SPM (until now we have not included the .m
files and got a permission to do so just recently). It's rather an
older version that you got directly from the support company.
The version we have is now informally supported by Marc Lalancette and
he might be interested in checking whether there is still a bug there.
Best,
Vladimir
On Mon, Jul 5, 2010 at 1:40 PM, Fabian Tomaschek <[log in to unmask]> wrote:
> Hello
> I have solved the problem.
> There is a bug in the writeCTFds routine.
> Somewhere in line 990 there is the following code:
>
> CODE:
> fwrite(fid,[labelword(k,:) ' ' clName ' coil position ',...
> 'relative to ' relative(k,:) ' (cm):' char(10)],'char');
> CODE END
>
> with the problematic variable "relative".
> Relative is structured as : relative=strvcat('dewar','dewar','head');
> which produces 5 columns. When "relative(k,:)" accesses the third line, it procudes "head_" with 5 columns, thats why there is a double space in the .hc file.
> One can solve the problem by inserting the following code instead of the upper one:
>
> CODE:
> if k ~= 3
> XX = 1:5;
> else
> XX = 1:4;
> end
>
> fwrite(fid,[labelword(k,:) ' ' clName ' coil position ',...
> 'relative to ' relative(k,XX) ' (cm):' char(10)],'char');
>
> CODE END
>
> this will access "relative" properly and produce a proper .hc file.
>
> Greetings from Tübingen
> Fabian
>
|