Re: [Marsbar-users] % signal change error (NaN's cannot be convertet to logicals)
Status: Beta
Brought to you by:
matthewbrett
From: Matthew B. <mat...@gm...> - 2005-01-07 04:07:18
|
Hi, > the calculation of % signal change with some of my datasets works without > any problems, but with others I get the following error message: > > Error using ==> ~ > > NaN's cannot be converted to logicals. > > Error in ==> ...\marsbar.m > On line 900 ==> if ~has_images(marsD) This is rather an odd problem. What has happened, is that marsbar has not been able to work out if the design that it was passed is from SPM99 or SPM2, and so creates a default design object, which then causes this error. I have only seen this happen when you have started using SPM2, and then switched to using SPM99 during the same matlab session, and then created a design. Here is the basic algorithm that marsbar uses to recognize the design (<marsbar>/@mardo_{99, 3}/private/my_design.m): It is an SPM99 design if the SPMid variable in the SPM.mat file starts with string 'SPM99' It is an SPM2 design if the SPM.mat file contains a variable 'SPM' Usually the problem you've found is caused when SPM99 designs have somehow collected an SPMid string that begins with SPM2, Best, Matthew |