View Full Version : "multi-level indexing" Error
ROGER DE GARDELLE
October 4th, 2006, 09:27
Hello,
I use the latest version of Brainstorm with Matlab 7.
Things used to go well, but now when I want to load
one of my datasets I get the following error :
"Scalar index required for this type of multi-level indexing"
Allthough I have read something on the topic (copy paste the error message on google and read the first link proposed), I don't see the point with my problem.
There is no problem for reading the .mat file in Matlab but Brainstorm
doesn't want it, while it has all the required variables.
Thanks for help,
-Vincent
Sylvain
October 4th, 2006, 11:14
Hi Vincent,
I suppose this occurs when loading the datafile from the DataManager. This is the first occurence of such error within BST to my knowledge.
would you mind attaching this datafile and associated channel file to this forum thread please ?
Thanks.
ROGER DE GARDELLE
October 5th, 2006, 03:19
Indeed it is with the DataManager.
But I have just made the same operations with older data + old brainstormstudy.mat, + old channel.mat, and it works...
Then I have tried my new data with the old channel.mat and brainstormstudy.mat, and I had the same error message.
Sylvain
October 5th, 2006, 03:28
then what's new with your new data ? please post it here and send me the files by mail at your best convenience.
ROGER DE GARDELLE
October 5th, 2006, 03:56
I have found out (something): the problem comes from an additionnal variable I had in the data.
I saved a F matrix, but also a Fmean matrix which is similar, but the values in Fmean are smaller: in the array editor a Fmean value looks like: -2.0147e-015
I made several tests, and sometimes the problem disappears when I change the values in Fmean (in Matlab Command Window: load data.mat, Fmean = Fmean * 10e17; save...) and reload the data in BST Data Manager,
BUT it also happened that the pb disappeared when changing the name of "Fmean" in "tmp" and save all in data.mat ...
I think I don't understand anything to this !
I send you files by mail.
Sylvain
October 5th, 2006, 15:48
OK this is fixed Vincent.
You got the right intuition. BST data loader was not robust to the presence of multiple variables with names beginning by an 'F' in a datafile. This has been fixed in the nightly update (ver. 2.2.9) . Meanwhile, here is a patch you need to unzip in the Toolbox folder.
Thanks for helping us in the fixings.
ROGER DE GARDELLE
October 6th, 2006, 04:02
Hi,
It's now ok when I load my data with the DataManager.
But it seems the problem feeds forward ...
when I now try to reconstruct the sources: in the DataViewer with my new data I select MinNormImaging in the Analysis part, and there is one moment where a function apparently checks for the format of data, and I think it finds that there are too many variables...
I have the following errors:
??? Error using ==> strcmp
Too many input arguments.
Error in ==> sourceimaging at 252
if strcmp(whoos(iF).class,'char') % Data in native format
Error in ==> dataplot_cb at 712
sourceimaging('create', SrcImagingGUI)
there is a "whos" which check for the variables in the data.
Wouldn't it be convenient to match it with the expected BST variables ?
Sorry I give you some work...
Thanks for help,
-Vincent
Sylvain
October 6th, 2006, 12:25
That's right.
I've fixed sourceimaging.m (attached here). I was able to run a source imaging step on your data (see attached image).
There might be other instances where things crash but so far so good.