Subscript indices must either be real positive integers or logicals. The error starts when I am doing smoothing of the scan. However, I need positive and negative integer since its for brain scanning. Is there a method to solve this program?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
% PREPARATION OF DATA FOR CLUSTERING ANALYSIS
%Creating a copy of the original dataset
scan = X;
mn = var(scan,0,3);
imagesc(mn);
%STEP 1: Normalization
A = A*-1;
scan = scan+A;
[m n p] = size(scan);
% Median Filter
for p = 1:180,
I = X(:,:,p);
smooth(:,:,p) = medfilt2(I,[m n]);
end
scan =smooth(I);
scan = reshape(smooth,m*n,p);
2 comentarios
KSSV
el 17 de Mzo. de 2017
Without knowing data, and the error line it would be tough to help you. I suspect you got error here scan =smooth(I); You are sending matrix I inside smooth, I doesn't have all positive integers, so error popped.
Walter Roberson
el 17 de Mzo. de 2017
And you overwrite scan on the next line so there is no reason to have the line anyhow.
Respuestas (0)
Ver también
Categorías
Más información sobre Smoothing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!