Borrar filtros
Borrar filtros

The logical indices contain a true value outside of the array bounds

5 visualizaciones (últimos 30 días)
Ishfaque Ahmed
Ishfaque Ahmed el 22 de Mayo de 2021
Respondida: Stephen23 el 22 de Mayo de 2021
I am trying to correct the voxel size and set outlier if fMRI activation maps and getting this error.
Error in voxel_size (line 38)
himg=aimg(mask>0);

Respuestas (1)

Stephen23
Stephen23 el 22 de Mayo de 2021
As the error states, your logical indexing includes a TRUE value outside the size of that array. Compare:
V = randi(9,1,3)
V = 1×3
4 6 2
X = [true,false,true,false,false,false,false,false,false,false]
X = 1×10 logical array
1 0 1 0 0 0 0 0 0 0
V(X) % no error
ans = 1×2
4 2
Y = [true,false,true,false,false,false,false,false,false,true]
Y = 1×10 logical array
1 0 1 0 0 0 0 0 0 1
V(Y) % last TRUE is outside size of V
The logical indices contain a true value outside of the array bounds.

Categorías

Más información sobre MRI en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by