help > zdim variable is not being defined
Showing 1-4 of 4 posts
Aug 20, 2014 06:08 PM | Chris Vance - University of Arizona
zdim variable is not being defined
I am trying to get SLOMOCO to run on my computer and everything is
working until the MATLAB functions are called in the last part of
the slicemoco_newalgorithm.sh script. I keep getting an errors
saying that the function or variable "fpparams" is not defined. The
reason I think fpparams is not being defined is because the zdim
variable is not being set to equal a number, earlier in output of
the script zdim = []. I am getting seperate errors for each of the
MATLAB functions that are called but the errors are basically the
same. I am not sure if the errors are coming from something going
wrong in MATLAB or something going wrong in the MATLAB scripts. I
have downloaded the SLOMOCO tools a second time in case I
accidentally changed something in one of the scripts that was
causing the errors but I am still getting the errors. Here is the
actual errors that I am getting (I tried to make the errors look
more like it does in my terminal):
< M A T L A B (R) >
Copyright 1984-2014 The MathWorks, Inc.
R2014a (8.3.0.532) 64-bit (maci64)
February 11, 2014
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit http://www.mathworks.com.
>>
tdim =
178
zdim =
[]
assuming slice timing==1, for interleaved ascending, siemens style
Undefined function or variable "fpparams".
Error in read_motion_newslicealg (line 48)
rotmats=fpparams(:,4:12);
>>
< M A T L A B (R) >
Copyright 1984-2014 The MathWorks, Inc.
R2014a (8.3.0.532) 64-bit (maci64)
February 11, 2014
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit http://www.mathworks.com.
>> using 36 slices, TR=2.000000 seconds
tdim =
178
zdim =
[]
Undefined function or variable "fpparams".
Error in read_motion_newslicealg (line 48)
rotmats=fpparams(:,4:12);
Error in qa_slomoco (line 54)
[outofplane,outofplane6]=read_motion_newslicealg(filestr_out,slice_timing);
< M A T L A B (R) >
Copyright 1984-2014 The MathWorks, Inc.
R2014a (8.3.0.532) 64-bit (maci64)
February 11, 2014
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit http://www.mathworks.com.
>>
tdim =
178
zdim =
[]
assuming slice timing==1, for interleaved ascending, siemens style
Undefined function or variable "fpparams".
Error in read_motion_newslicealg (line 48)
rotmats=fpparams(:,4:12);
>>
< M A T L A B (R) >
Copyright 1984-2014 The MathWorks, Inc.
R2014a (8.3.0.532) 64-bit (maci64)
February 11, 2014
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit http://www.mathworks.com.
>> using 36 slices, TR=2.000000 seconds
tdim =
178
zdim =
[]
Undefined function or variable "fpparams".
Error in read_motion_newslicealg (line 48)
rotmats=fpparams(:,4:12);
Error in qa_slomoco (line 54)
[outofplane,outofplane6]=read_motion_newslicealg(filestr_out,slice_timing);
Aug 20, 2014 08:08 PM | Erik Beall
RE: zdim variable is not being defined
Hi Chris,
Something is going wrong in the script that reads in the out-of-plane motion parameters from the text files stored in _pestica/empslmoco_volslc_alg_vol_ directory. FYI, those names were poorly chosen, I did not intend them to be as long as possible.
I think your error is occuring when this command is called:
mocoparams=read_motion_newslicealg('tempslmoco_volslc_alg_vol_$epi.slicemocoxy_afni/motion.wholevol_zt');
The shell script also echoes out the matlab command to be run, right before calling matlab. Can you check the tempslmoco_volslc_XXX directory inside _pestica/? There should be zdim number of files in it (the number of slices).
Erik
Something is going wrong in the script that reads in the out-of-plane motion parameters from the text files stored in _pestica/empslmoco_volslc_alg_vol_ directory. FYI, those names were poorly chosen, I did not intend them to be as long as possible.
I think your error is occuring when this command is called:
mocoparams=read_motion_newslicealg('tempslmoco_volslc_alg_vol_$epi.slicemocoxy_afni/motion.wholevol_zt');
The shell script also echoes out the matlab command to be run, right before calling matlab. Can you check the tempslmoco_volslc_XXX directory inside _pestica/? There should be zdim number of files in it (the number of slices).
Erik
Aug 21, 2014 01:08 AM | Chris Vance - University of Arizona
RE: zdim variable is not being defined
I just figured out the problem. It turns out I did not have the
gawk command installed on my computer so when the
read_motion_newslicealg.m script called gawk in line 12, it was not
getting an output. I installed gawk on my computer and the script
now works perfectly. Thanks for your help!
Aug 22, 2014 05:08 PM | Erik Beall
RE: zdim variable is not being defined
I completely forgot about that. I use gawk and sed inside my
programs and didn't mention these are needed!